File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9393 PYGFX_EXPECT_LAVAPIPE : true
9494 run : |
9595 pytest -v examples
96- pytest --nbmake examples/notebooks/
96+ FASTPLOTLIB_NB_TESTS=1 pytest --nbmake examples/notebooks/
9797 - uses : actions/upload-artifact@v3
9898 if : ${{ failure() }}
9999 with :
Original file line number Diff line number Diff line change 2121FAILURES = list ()
2222
2323
24+ def _run_tests ():
25+ if "FASTPLOTLIB_NB_TESTS" not in os .environ .keys ():
26+ return False
27+
28+ if os .environ ["FASTPLOTLIB_NB_TESTS" ] == "1" :
29+ return True
30+
31+ return False
32+
33+
2434def plot_test (name , plot : Union [Plot , GridPlot ]):
35+ if not _run_tests ():
36+ return
2537 snapshot = plot .canvas .snapshot ()
2638
2739 if "REGENERATE_SCREENSHOTS" in os .environ .keys ():
@@ -81,6 +93,9 @@ def get_diffs_rgba(slicer):
8193
8294
8395def notebook_finished ():
96+ if not _run_tests ():
97+ return
98+
8499 if len (FAILURES ) > 0 :
85100 raise AssertionError (
86101 f"Failures for plots:\n { FAILURES } "
You can’t perform that action at this time.
0 commit comments