diff options
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r-- | Lib/test/test_os.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 2ddda8a..1f6499c 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -273,6 +273,13 @@ class EnvironTests(mapping_tests.BasicTestMappingProtocol): value = os.popen("/bin/sh -c 'echo $HELLO'").read().strip() self.assertEquals(value, "World") + # Verify environ keys and values from the OS are of the + # correct str type. + def test_keyvalue_types(self): + for key, val in os.environ.items(): + self.assertEquals(type(key), str) + self.assertEquals(type(val), str) + class WalkTests(unittest.TestCase): """Tests for os.walk().""" |