[pypy-svn] pypy commit f40c2a8d81d8: Fix the test.

Bitbucket commits-noreply at bitbucket.org
Tue Dec 14 13:59:48 CET 2010


# HG changeset patch -- Bitbucket.org
# Project pypy
# URL http://bitbucket.org/pypy/pypy/overview
# User Armin Rigo <arigo at tunes.org>
# Date 1292331576 -3600
# Node ID f40c2a8d81d870e5b5be81dab104e93a05aedcbf
# Parent  4959e3dccca7ab37617ae8532e90cc6cb94efd72
Fix the test.

--- a/pypy/rlib/parsing/test/test_pythonparse.py
+++ b/pypy/rlib/parsing/test/test_pythonparse.py
@@ -240,7 +240,10 @@ a = 1 - 2 - 3
         t = self.ToAST.transform(t)
 
     def test_parse_this(self):
-        s = py.path.local(__file__).read()
+        filename = __file__
+        if filename.lower().endswith('.pyc'):
+            filename = filename[:-1]
+        s = py.path.local(filename).read()
         t = self.parse(s)
         t = self.ToAST.transform(t)



More information about the Pypy-commit mailing list