]> git.phdru.name Git - ppu.git/commitdiff
CI(GHActions): Teardown harder
authorOleg Broytman <phd@phdru.name>
Sun, 18 Sep 2022 14:47:04 +0000 (17:47 +0300)
committerOleg Broytman <phd@phdru.name>
Sun, 18 Sep 2022 14:57:28 +0000 (17:57 +0300)
tests/ppu_tu.py
tests/test_remove_old_files.py

index 1ce2b64fd040dc196dbf051c07c7156bdec879d7..94de246c490c64bcf09da304e1cb6c8f9095f62c 100644 (file)
@@ -15,7 +15,7 @@ def setup():
 
 def teardown():
     os.chdir(os.sep)  # To the root of the FS
-    shutil.rmtree(tmp_dir)
+    shutil.rmtree(tmp_dir, ignore_errors=True)
 
 
 def find_in_path(name):
index dce091d7334b3fe3a0bc261faeeec4c70bfffd7a..645362a14dbfa2e74f870f0ef5d76c367d99e7fc 100755 (executable)
@@ -37,6 +37,11 @@ def test_recursive():
 
 
 def test_remove_empty_directory():
+    teardown()
+    try:
+        setup()
+    except OSError:
+        pass
     create_files(['test3', 'test4'], 'subdir')
     test3 = os.path.join('subdir', 'test3')
     test4 = os.path.join('subdir', 'test4')