diff --git a/unittests/test_suppressKnown.py b/unittests/test_suppressKnown.py index d148a5a3840d0d6224696ecdd62dda6a5d41b7ba..c3e65dbe757bf2bfb3cdf4e7ff4f86c6882ddbfc 100644 --- a/unittests/test_suppressKnown.py +++ b/unittests/test_suppressKnown.py @@ -60,11 +60,17 @@ class SupTestAdvanced(SupTestBasic): self.db_file = os.path.join(gettempdir(), "test_suppress_msg_db_file_advanced.db") self.basic = SuppressKnown(db_file=self.db_file) + @unittest.skipIf(os.name == "nt", "Known issue on Windows, see https://docs.python.org/3/library/tempfile.html#tempfile.NamedTemporaryFile") def test_logger(self): """ The logging output is directed to a file which is then checked whether the output is as expected. """ + # TODO: this test is problematic on Windows due to the file being locked + # by the logger. This is a known issue and should be fixed in the + # future. + # For now, the test is disabled on Windows. + # See https://docs.python.org/3/library/tempfile.html#tempfile.NamedTemporaryFile logfile = NamedTemporaryFile(delete=False, mode="w") logger = logging.getLogger() logger.addHandler(logging.FileHandler(logfile.name))