Discussion:
[Python-3000-checkins] r65344 - in python/branches/py3k/Lib/test: test_os.py test_posix.py
amaury.forgeotdarc
2008-08-01 00:14:22 UTC
Permalink
Author: amaury.forgeotdarc
Date: Fri Aug 1 02:14:22 2008
New Revision: 65344

Log:
posix.fdopen does not exists any more; and os.fdopen exists on all platforms.
Move tests from test_posix to test_os.


Modified:
python/branches/py3k/Lib/test/test_os.py
python/branches/py3k/Lib/test/test_posix.py

Modified: python/branches/py3k/Lib/test/test_os.py
==============================================================================
--- python/branches/py3k/Lib/test/test_os.py (original)
+++ python/branches/py3k/Lib/test/test_os.py Fri Aug 1 02:14:22 2008
@@ -134,6 +134,16 @@
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):

Modified: python/branches/py3k/Lib/test/test_posix.py
==============================================================================
--- python/branches/py3k/Lib/test/test_posix.py (original)
+++ python/branches/py3k/Lib/test/test_posix.py Fri Aug 1 02:14:22 2008
@@ -89,17 +89,6 @@
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,

Loading...