Following an idea by Ron Adam, make sure keys and values in the
environ dict are strings (in particular, not 8-bit strings).
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 @@
             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()."""