From e3d1c602f4c6d2501f3083041c56c8ee0cdb720a Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Thu, 4 Jul 2024 16:19:31 +0100 Subject: [PATCH 1/2] Fix equality check in TVTK-related test --- apptools/persistence/tests/test_state_pickler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apptools/persistence/tests/test_state_pickler.py b/apptools/persistence/tests/test_state_pickler.py index d0de88d9..8cdd41f4 100644 --- a/apptools/persistence/tests/test_state_pickler.py +++ b/apptools/persistence/tests/test_state_pickler.py @@ -251,7 +251,9 @@ def verify_state(self, state1, state): ).__metadata__["id"] if TVTK_AVAILABLE: - self.assertEqual(state1._tvtk, state._tvtk) + # Some of the values are NumPy arrays, so use NumPy's + # assert_equal instead of the unittest assertEqual. + numpy.testing.assert_equal(state1._tvtk, state._tvtk) state1.tuple[-1].__metadata__["id"] = state.tuple[-1].__metadata__[ "id" From 080630c0b3a695701904ac13e2aa88c66f4b78d7 Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Thu, 4 Jul 2024 16:21:03 +0100 Subject: [PATCH 2/2] Add news fragment --- docs/releases/upcoming/352.bugfix.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/releases/upcoming/352.bugfix.rst diff --git a/docs/releases/upcoming/352.bugfix.rst b/docs/releases/upcoming/352.bugfix.rst new file mode 100644 index 00000000..9ec16e4e --- /dev/null +++ b/docs/releases/upcoming/352.bugfix.rst @@ -0,0 +1 @@ +Fix a test that was broken in the presence of Mayavi / TVTK. (#352)