]> granicus.if.org Git - python/commitdiff
Fix test_posix (regression introduced by r80885)
authorVictor Stinner <victor.stinner@haypocalc.com>
Thu, 6 May 2010 22:19:30 +0000 (22:19 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Thu, 6 May 2010 22:19:30 +0000 (22:19 +0000)
Lib/test/test_posix.py

index fa1abe3f154ad2705f8bb7cc247f4292f758b515..cbc786cdc0f585803d02a59a6931a23af5cc63ef 100644 (file)
@@ -299,9 +299,13 @@ class PosixTester(unittest.TestCase):
                 posix.lchflags(support.TESTFN, st.st_flags)
 
     def test_environ(self):
+        if os.name == "nt":
+            item_type = str
+        else:
+            item_type = bytes
         for k, v in posix.environ.items():
-            self.assertEqual(type(k), str)
-            self.assertEqual(type(v), str)
+            self.assertEqual(type(k), item_type)
+            self.assertEqual(type(v), item_type)
 
     def test_getcwd_long_pathnames(self):
         if hasattr(posix, 'getcwd'):