diff options
| author | Skip Montanaro <skip@pobox.com> | 2006-04-20 01:29:48 +0000 |
|---|---|---|
| committer | Skip Montanaro <skip@pobox.com> | 2006-04-20 01:29:48 +0000 |
| commit | 94785ef14294e9d924c9ceee3d6f9082d4555f28 (patch) | |
| tree | 5953b37130e2af4a1cd7ebd5f80784962e97b750 /Lib/test/test_posix.py | |
| parent | d0b8e83dc5b92e71d08d39298641d679be419dd8 (diff) | |
| download | cpython-git-94785ef14294e9d924c9ceee3d6f9082d4555f28.tar.gz | |
Correct implementation and documentation of os.confstr. Add a simple test
case. I've yet to figure out how to provoke a None return I can test.
Diffstat (limited to 'Lib/test/test_posix.py')
| -rw-r--r-- | Lib/test/test_posix.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index 1ccc62bdf2..f98c723193 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -73,6 +73,11 @@ class PosixTester(unittest.TestCase): finally: fp.close() + def test_confstr(self): + if hasattr(posix, 'confstr'): + self.assertRaises(ValueError, posix.confstr, "CS_garbage") + self.assertEqual(len(posix.confstr("CS_PATH")) > 0, True) + def test_dup2(self): if hasattr(posix, 'dup2'): fp1 = open(test_support.TESTFN) |
