mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-27 02:31:45 +02:00
Ignore failure to remove tempdir during test tear down
This commit is contained in:
@@ -7,7 +7,7 @@ import shutil
|
|||||||
import stat
|
import stat
|
||||||
import tempfile
|
import tempfile
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager, suppress
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from kittens.transfer.rsync import Differ, Hasher, Patcher, parse_ftc
|
from kittens.transfer.rsync import Differ, Hasher, Patcher, parse_ftc
|
||||||
@@ -188,7 +188,8 @@ class TestFileTransmission(BaseTest):
|
|||||||
self.orig_home = os.environ.get('HOME')
|
self.orig_home = os.environ.get('HOME')
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
shutil.rmtree(self.tdir)
|
with suppress(FileNotFoundError):
|
||||||
|
shutil.rmtree(self.tdir)
|
||||||
self.responses = []
|
self.responses = []
|
||||||
if self.orig_home is None:
|
if self.orig_home is None:
|
||||||
os.environ.pop('HOME', None)
|
os.environ.pop('HOME', None)
|
||||||
|
|||||||
Reference in New Issue
Block a user