From 76381f5cdd7ef95a6c9b5bfb01e817393c90f534 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 15 Feb 2024 14:50:21 +0530 Subject: [PATCH] Another tdir rmtree failure during tear down ignored --- kitty_tests/fonts.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kitty_tests/fonts.py b/kitty_tests/fonts.py index b850654fa..e5184c474 100644 --- a/kitty_tests/fonts.py +++ b/kitty_tests/fonts.py @@ -6,6 +6,7 @@ import shutil 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 @@ class Rendering(BaseTest): 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):