diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-11-04 12:16:35 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-04 12:16:35 (GMT) |
commit | d4d79bc1ff91b04625c312f0219c89aabcd19ce4 (patch) | |
tree | ba24dc24106347ce69d12d5e27532ccfb929e50e /Lib/test/test_shutil.py | |
parent | 82cd3cede804ca694fb0657fd985d5eff84a414f (diff) | |
download | cpython-d4d79bc1ff91b04625c312f0219c89aabcd19ce4.zip cpython-d4d79bc1ff91b04625c312f0219c89aabcd19ce4.tar.gz cpython-d4d79bc1ff91b04625c312f0219c89aabcd19ce4.tar.bz2 |
bpo-28564: Use os.scandir() in shutil.rmtree(). (#4085)
This speeds up it to 20-40%.
Diffstat (limited to 'Lib/test/test_shutil.py')
-rw-r--r-- | Lib/test/test_shutil.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py index 3b4891d..4a72b4a 100644 --- a/Lib/test/test_shutil.py +++ b/Lib/test/test_shutil.py @@ -183,7 +183,7 @@ class TestShutil(unittest.TestCase): errors.append(args) shutil.rmtree(filename, onerror=onerror) self.assertEqual(len(errors), 2) - self.assertIs(errors[0][0], os.listdir) + self.assertIs(errors[0][0], os.scandir) self.assertEqual(errors[0][1], filename) self.assertIsInstance(errors[0][2][1], NotADirectoryError) self.assertIn(errors[0][2][1].filename, possible_args) |