From 00044dcb6327f0e9d74264167d116d5cf62781ae Mon Sep 17 00:00:00 2001 From: JWM Date: Mon, 25 Nov 2024 22:03:52 +0100 Subject: [PATCH] Fix tests by emptying fingerprints of Finding for each test --- tests/test_integration.py | 3 ++- tests/test_polyspace.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_integration.py b/tests/test_integration.py index 926400bf..f2cbb4f0 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -6,7 +6,7 @@ from unittest.mock import patch -from mlx.warnings import warnings_wrapper, WarningsConfigError +from mlx.warnings import warnings_wrapper, WarningsConfigError, Finding TEST_IN_DIR = Path(__file__).parent / 'test_in' TEST_OUT_DIR = Path(__file__).parent / 'test_out' @@ -14,6 +14,7 @@ class TestIntegration(TestCase): def setUp(self): + Finding.fingerprints = {} if not TEST_OUT_DIR.exists(): TEST_OUT_DIR.mkdir() diff --git a/tests/test_polyspace.py b/tests/test_polyspace.py index e45ad3fd..9779ba51 100644 --- a/tests/test_polyspace.py +++ b/tests/test_polyspace.py @@ -14,6 +14,7 @@ class TestCodeProverWarnings(unittest.TestCase): def setUp(self): + Finding.fingerprints = {} self.warnings = WarningsPlugin(verbose=True) self.dut = self.warnings.activate_checker_name('polyspace') self.dut.checkers = [