Skip to content

Commit 1cafb3b

Browse files
committed
BUG: Improved robustness of testing on Travis
1 parent 8934eeb commit 1cafb3b

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

OMMBV/tests/test_core.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2609,8 +2609,13 @@ def test_unit_vector_and_field_line_plots(self):
26092609

26102610
trace_s = []
26112611
if not on_travis:
2612-
fig = plt.figure()
2613-
ax = fig.add_subplot(111, projection='3d')
2612+
try:
2613+
fig = plt.figure()
2614+
ax = fig.add_subplot(111, projection='3d')
2615+
except:
2616+
print('Disabling plotting for tests due to error.')
2617+
on_travis = True
2618+
26142619

26152620
#
26162621
date = datetime.datetime(2000, 1, 1)

0 commit comments

Comments
 (0)