[pypy-commit] pypy default: Windows compatibility: this is how the tests pass on CPython

arigo noreply at buildbot.pypy.org
Tue May 24 15:57:18 CEST 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r44406:9791ea426e35
Date: 2011-05-24 15:48 +0200
http://bitbucket.org/pypy/pypy/changeset/9791ea426e35/

Log:	Windows compatibility: this is how the tests pass on CPython (2.6)
	on Windows.

diff --git a/pypy/module/zipimport/test/test_zipimport.py b/pypy/module/zipimport/test/test_zipimport.py
--- a/pypy/module/zipimport/test/test_zipimport.py
+++ b/pypy/module/zipimport/test/test_zipimport.py
@@ -121,6 +121,7 @@
             del _zip_directory_cache[self.zipfile]
 
     def test_cache_subdir(self):
+        import os
         self.writefile('x.py', '')
         self.writefile('sub/__init__.py', '')
         self.writefile('sub/yy.py', '')
@@ -130,7 +131,7 @@
 
         assert main_importer is not sub_importer
         assert main_importer.prefix == ""
-        assert sub_importer.prefix == "sub/"
+        assert sub_importer.prefix == "sub" + os.path.sep
 
     def test_good_bad_arguments(self):
         from zipimport import zipimporter
@@ -296,7 +297,7 @@
         archive = importer.archive
         realprefix = importer.prefix
         allbutlast = self.zipfile.split(os.path.sep)[:-1]
-        prefix = 'directory/'
+        prefix = 'directory' + os.path.sep
         assert archive == self.zipfile
         assert realprefix == prefix
 


More information about the pypy-commit mailing list