From fce12b95f963e9034eecf33bbbfa00385331470f Mon Sep 17 00:00:00 2001 From: Tom Date: Mon, 1 Aug 2022 12:49:04 -0400 Subject: [PATCH] set plots to run interactive mode (no blocking) (#214) --- test/conftest.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/conftest.py diff --git a/test/conftest.py b/test/conftest.py new file mode 100644 index 00000000..9ec6cc61 --- /dev/null +++ b/test/conftest.py @@ -0,0 +1,12 @@ +"""Pytest configuration file.""" + +import matplotlib.pyplot as plt + +def pytest_configure(config): + """Set configurations to be run before all testing.""" + + # Turn on interactive mode for matplotlib + # In practice, this defaults `block=False` for plt.show() + # This means that plots won't show and wait for input before proceeding + # To run tests while showing plots, comment this out, or replace with `plt.ioff` + plt.ion()