Author: Antonio Cuni <[email protected]>
Branch: py3k
Changeset: r55588:24b0c04351cd
Date: 2012-06-11 16:35 +0200
http://bitbucket.org/pypy/pypy/changeset/24b0c04351cd/

Log:    pyc files are now stored in __pycache__, fish it from there

diff --git a/pypy/translator/goal/test2/test_app_main.py 
b/pypy/translator/goal/test2/test_app_main.py
--- a/pypy/translator/goal/test2/test_app_main.py
+++ b/pypy/translator/goal/test2/test_app_main.py
@@ -45,13 +45,15 @@
         sys.path.insert(0, dir)
         __import__(modname)
         sys.path.pop(0)
-        for key in sys.modules.keys():
+        for key in list(sys.modules.keys()):
             if key not in d:
                 del sys.modules[key]
     """)
-    p = str(p) + 'c'
-    assert os.path.isfile(p)   # the .pyc file should have been created above
-    return p
+    # the .pyc file should have been created above
+    pycache = p.dirpath('__pycache__')
+    pycs = pycache.listdir(p.basename + '*.pyc')
+    assert len(pycs) == 1
+    return str(pycs[0])
 
 def getscript_in_dir(source):
     pdir = _get_next_path(ext='')
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to