From 3c15515faf96c437207b8de9eb0d2c8a72fb9e55 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Mon, 29 Jan 2024 14:36:10 -0500 Subject: [PATCH] texture: Clear the existing texture cache before testing This test started failing after updating to pytest 8.0. I fix it by clearing the cache so the test can begin with a clear slate. Signed-off-by: Anna Schumaker --- tests/test_texture.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_texture.py b/tests/test_texture.py index 646585d..4349595 100644 --- a/tests/test_texture.py +++ b/tests/test_texture.py @@ -12,6 +12,10 @@ from gi.repository import Gdk class TestTextureCache(unittest.TestCase): """Test our custom cache dictionary.""" + def setUpClass(): + """Clear the existing cache before testing.""" + emmental.texture.CACHE.clear() + def setUp(self): """Set up common variables.""" cover = tests.util.COVER_JPG.absolute().relative_to("/")