Skip to content

Commit ba20222

Browse files
authored
Fix equality check in TVTK-related test (#352)
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.
1 parent bd6689a commit ba20222

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

apptools/persistence/tests/test_state_pickler.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,9 @@ def verify_state(self, state1, state):
251251
).__metadata__["id"]
252252

253253
if TVTK_AVAILABLE:
254-
self.assertEqual(state1._tvtk, state._tvtk)
254+
# Some of the values are NumPy arrays, so use NumPy's
255+
# assert_equal instead of the unittest assertEqual.
256+
numpy.testing.assert_equal(state1._tvtk, state._tvtk)
255257

256258
state1.tuple[-1].__metadata__["id"] = state.tuple[-1].__metadata__[
257259
"id"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a test that was broken in the presence of Mayavi / TVTK. (#352)

0 commit comments

Comments
 (0)