diff options
Diffstat (limited to 'Lib/test/test_posix.py')
-rw-r--r-- | Lib/test/test_posix.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index e980dd0..fe21b21 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -606,8 +606,6 @@ class PosixTester(unittest.TestCase): finally: fp.close() - @unittest.skipUnless(hasattr(posix, 'stat'), - 'test needs posix.stat()') def test_stat(self): self.assertTrue(posix.stat(support.TESTFN)) self.assertTrue(posix.stat(os.fsencode(support.TESTFN))) @@ -658,7 +656,6 @@ class PosixTester(unittest.TestCase): except OSError as e: self.assertIn(e.errno, (errno.EPERM, errno.EINVAL, errno.EACCES)) - @unittest.skipUnless(hasattr(posix, 'stat'), 'test needs posix.stat()') @unittest.skipUnless(hasattr(posix, 'makedev'), 'test needs posix.makedev()') def test_makedev(self): st = posix.stat(support.TESTFN) @@ -755,8 +752,7 @@ class PosixTester(unittest.TestCase): # re-create the file support.create_empty_file(support.TESTFN) - self._test_all_chown_common(posix.chown, support.TESTFN, - getattr(posix, 'stat', None)) + self._test_all_chown_common(posix.chown, support.TESTFN, posix.stat) @unittest.skipUnless(hasattr(posix, 'fchown'), "test needs os.fchown()") def test_fchown(self): |