Another tdir rmtree failure during tear down ignored

This commit is contained in:
Kovid Goyal 2024-02-15 14:50:21 +05:30
parent 40a4429e58
commit 76381f5cdd
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -6,6 +6,7 @@
import sys
import tempfile
import unittest
from contextlib import suppress
from functools import partial
from kitty.constants import is_macos, read_kitty_resource
@ -34,7 +35,8 @@ def setUp(self):
def tearDown(self):
self.test_ctx.__exit__()
del self.sprites, self.cell_width, self.cell_height, self.test_ctx
shutil.rmtree(self.tdir)
with suppress(FileNotFoundError):
shutil.rmtree(self.tdir)
super().tearDown()
def test_sprite_map(self):