Fix skip condition for test_fd

This commit is contained in:
Dean Li
2021-04-04 22:29:04 +08:00
parent e9aa81b003
commit 7a890256aa

View File

@@ -3958,8 +3958,8 @@ class TestScandir(unittest.TestCase):
self.assertIs(type(entry.name), bytes)
self.assertIs(type(entry.path), bytes)
@unittest.skipUnless(os.listdir in os.supports_fd,
'fd support for listdir required for this test.')
@unittest.skipUnless(os.scandir in os.supports_fd,
'fd support for scandir required for this test.')
def test_fd(self):
self.assertIn(os.scandir, os.supports_fd)
self.create_file('file.txt')