diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2010-02-22 16:01:22 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2010-02-22 16:01:22 (GMT) |
commit | d2a577d6234c2f09617fe8ba216156f78fade1ab (patch) | |
tree | 3cf304a4ac5db361522d9f3608153db4caae8610 /Lib/test | |
parent | f9793a36a490a2702da5b3055b757dc9882bbaa8 (diff) | |
download | cpython-d2a577d6234c2f09617fe8ba216156f78fade1ab.zip cpython-d2a577d6234c2f09617fe8ba216156f78fade1ab.tar.gz cpython-d2a577d6234c2f09617fe8ba216156f78fade1ab.tar.bz2 |
Merged revisions 78316 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r78316 | ezio.melotti | 2010-02-22 17:59:01 +0200 (Mon, 22 Feb 2010) | 1 line
#7310: fix the repr() of os.environ
........
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_os.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 907f943..d7f763f 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -400,6 +400,14 @@ class EnvironTests(mapping_tests.BasicTestMappingProtocol): for key, value in self._reference().items(): self.assertEqual(os.environ.get(key), value) + # Issue 7310 + def test___repr__(self): + """Check that the repr() of os.environ looks like environ({...}).""" + env = os.environ + self.assertTrue(isinstance(env.data, dict)) + self.assertEqual(repr(env), 'environ({!r})'.format(env.data)) + + class WalkTests(unittest.TestCase): """Tests for os.walk().""" |