diff options
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-08-01 00:14:22 (GMT) |
---|---|---|
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-08-01 00:14:22 (GMT) |
commit | e2e36ba69600bf01ab43a003f788dbfab6e27cd1 (patch) | |
tree | 16680ebcdefd5c9fc65732519b02fcb6de3ebbd6 /Lib/test/test_os.py | |
parent | bdbddf8a82efd0e67f4006af91ce65bec2bf0a60 (diff) | |
download | cpython-e2e36ba69600bf01ab43a003f788dbfab6e27cd1.zip cpython-e2e36ba69600bf01ab43a003f788dbfab6e27cd1.tar.gz cpython-e2e36ba69600bf01ab43a003f788dbfab6e27cd1.tar.bz2 |
posix.fdopen does not exists any more; and os.fdopen exists on all platforms.
Move tests from test_posix to test_os.
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r-- | Lib/test/test_os.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index f0b734e..09270e1 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -134,6 +134,16 @@ class TemporaryFileTests(unittest.TestCase): else: self.check_tempfile(name) + def fdopen_helper(self, *args): + fd = os.open(support.TESTFN, os.O_RDONLY) + fp2 = os.fdopen(fd, *args) + fp2.close() + + def test_fdopen(self): + self.fdopen_helper() + self.fdopen_helper('r') + self.fdopen_helper('r', 100) + # Test attributes on return values from os.*stat* family. class StatAttributeTests(unittest.TestCase): def setUp(self): |