Skip to content

Commit

Permalink
Fix equality check in TVTK-related test (#352)
Browse files Browse the repository at this point in the history
Closes #305.

Ideally we'd install Mayavi into the test environment in the test
workflows, but I think that's too much of a maintenance risk. It would
be even better to find a way to remove the TVTK-specific specializations
altogether.
  • Loading branch information
mdickinson authored Jul 4, 2024
1 parent bd6689a commit ba20222
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apptools/persistence/tests/test_state_pickler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions docs/releases/upcoming/352.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a test that was broken in the presence of Mayavi / TVTK. (#352)

0 comments on commit ba20222

Please sign in to comment.