From: Amaury Forgeot d'Arc Date: Fri, 1 Aug 2008 00:14:22 +0000 (+0000) Subject: posix.fdopen does not exists any more; and os.fdopen exists on all platforms. X-Git-Tag: v3.0b3~202 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e2e36ba69600bf01ab43a003f788dbfab6e27cd1;p=thirdparty%2FPython%2Fcpython.git posix.fdopen does not exists any more; and os.fdopen exists on all platforms. Move tests from test_posix to test_os. --- diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index f0b734ebd52f..09270e10f8ab 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): diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index b7ce71eda4a6..5b5198d98e75 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -89,17 +89,6 @@ class PosixTester(unittest.TestCase): fp1.close() fp2.close() - def fdopen_helper(self, *args): - fd = os.open(support.TESTFN, os.O_RDONLY) - fp2 = posix.fdopen(fd, *args) - fp2.close() - - def test_fdopen(self): - if hasattr(posix, 'fdopen'): - self.fdopen_helper() - self.fdopen_helper('r') - self.fdopen_helper('r', 100) - def test_osexlock(self): if hasattr(posix, "O_EXLOCK"): fd = os.open(support.TESTFN,