From d066c6d6d9000e2fe2226b47643db5ede528b2fd Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Mon, 26 Jun 2023 15:00:47 +0100 Subject: [PATCH] Fix an overzealous test (#1749) This PR fixes one part of the cause of #1748, namely that a test was failing on warnings that were unrelated to the test purpose. --- traits/tests/test_configure_traits.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/traits/tests/test_configure_traits.py b/traits/tests/test_configure_traits.py index e192351b5..28dfca975 100644 --- a/traits/tests/test_configure_traits.py +++ b/traits/tests/test_configure_traits.py @@ -155,4 +155,8 @@ def test_edit_not_given(self): warnings.simplefilter("always", DeprecationWarning) model.configure_traits() mock_view.assert_called_once() - self.assertEqual(len(captured_warnings), 0) + + all_warnings = "".join( + str(warning.message) for warning in captured_warnings + ) + self.assertNotIn("edit argument", all_warnings)