8000 MRG, FIX: Fix tick labeling by larsoner · Pull Request #7811 · mne-tools/mne-python · GitHub
[go: up one dir, main page]

Skip to content

MRG, FIX: Fix tick labeling #7811

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 22, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
FIX: Add debugging
  • Loading branch information
larsoner committed May 22, 2020
commit 0ae2360fa2cd7f742cf3f77c07755f71818c80d5
15 changes: 11 additions & 4 deletions mne/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def pytest_configure(config):
ignore:.*pandas\.util\.testing is deprecated.*:
ignore:.*tostring.*is deprecated.*:DeprecationWarning
always:.*get_data.* is deprecated in favor of.*:DeprecationWarning
ignore:.*Passing the dash.*:
""" # noqa: E501
for warning_line in warning_lines.split('\n'):
warning_line = warning_line.strip()
Expand Down Expand Up @@ -121,13 +122,19 @@ def matplotlib_config():
"""Configure matplotlib for viz tests."""
import matplotlib
from matplotlib import cbook
# "force" should not really be necessary but should not hurt
kwargs = dict()
# Allow for easy interactive debugging with a call like:
#
# $ MNE_MPL_TESTING_BACKEND=Qt5Agg pytest mne/viz/tests/test_raw.py -k annotation -x --pdb # noqa: E501
#
try:
want = os.environ['MNE_MPL_TESTING_BACKEND']
except KeyError:
want = 'agg' # don't pop up windows
with warnings.catch_warnings(record=True): # ignore warning
warnings.filterwarnings('ignore')
matplotlib.use('agg', force=True, **kwargs) # don't pop up windows
matplotlib.use(want, force=True)
import matplotlib.pyplot as plt
assert plt.get_backend() == 'agg'
assert plt.get_backend() == want
# overwrite some params that can horribly slow down tests that
# users might have changed locally (but should not otherwise affect
# functionality)
Expand Down
0