From 699f1598fc002ed3b176c1e2c12f3eccd2fa66f7 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sun, 23 Jul 2023 10:04:18 -0300 Subject: [PATCH] Ignore errors (Windows) --- tests/test_commands.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/test_commands.py b/tests/test_commands.py index 15a486a6d..20787ccc9 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -25,7 +25,10 @@ class TestCommands(TestCase): def tearDown(self): os.chdir(self.original_cwd) - shutil.rmtree(self.tempdir) + try: + shutil.rmtree(self.tempdir) + except OSError: + pass # Ignore errors (Windows) def test_cmd_add(self): # Initialize the Commands and InputOutput objects @@ -254,7 +257,3 @@ class TestCommands(TestCase): self.assertIn(filenames[0], coder.abs_fnames) self.assertNotIn(filenames[1], coder.abs_fnames) self.assertIn(filenames[2], coder.abs_fnames) - - del commands - del coder - del io