[pypy-svn] r75247 - in pypy/trunk/pypy/module/zipimport: . test
afa at codespeak.net
afa at codespeak.net
Thu Jun 10 14:46:11 CEST 2010
Author: afa
Date: Thu Jun 10 14:46:09 2010
New Revision: 75247
Modified:
pypy/trunk/pypy/module/zipimport/interp_zipimport.py
pypy/trunk/pypy/module/zipimport/test/test_zipimport.py
Log:
Change the test so that is passes on CPython with the "-A" option.
Fix pypy implementation accordingly.
Modified: pypy/trunk/pypy/module/zipimport/interp_zipimport.py
==============================================================================
--- pypy/trunk/pypy/module/zipimport/interp_zipimport.py (original)
+++ pypy/trunk/pypy/module/zipimport/interp_zipimport.py Thu Jun 10 14:46:09 2010
@@ -242,7 +242,7 @@
pass
else:
if is_package:
- pkgpath = self.name + '/' + filename
+ pkgpath = self.name + os.path.sep + filename
else:
pkgpath = None
try:
Modified: pypy/trunk/pypy/module/zipimport/test/test_zipimport.py
==============================================================================
--- pypy/trunk/pypy/module/zipimport/test/test_zipimport.py (original)
+++ pypy/trunk/pypy/module/zipimport/test/test_zipimport.py Thu Jun 10 14:46:09 2010
@@ -201,7 +201,7 @@
self.writefile(self, "xxuuu/__init__.py", "")
self.writefile(self, "xxuuu/yy.py", "def f(x): return x")
mod = __import__("xxuuu", globals(), locals(), ['yy'])
- assert mod.__path__ == [self.zipfile + "/xxuuu"]
+ assert mod.__path__ == [self.zipfile + os.path.sep + "xxuuu"]
assert mod.__file__ == (self.zipfile + os.path.sep
+ "xxuuu" + os.path.sep
+ "__init__.py")
More information about the Pypy-commit
mailing list