8000 [MRG+2] MAINT: Refactor the converted-image cache by jkseppan · Pull Request #7764 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

[MRG+2] MAINT: Refactor the converted-image cache #7764

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

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
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
Next Next commit
Move pytest_addoption call to top-level conftest.py
It only works there, see pytest-dev/pytest#1427
  • Loading branch information
jkseppan committed Feb 22, 2017
commit f47cbe4314ae001b08a289c9965c427b6b80f7ff
11 changes: 11 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from __future__ import (absolute_import, division, print_function,
unicode_literals)


def pytest_addoption(parser):
group = parser.getgroup("matplotlib", "matplotlib custom options")
group.addoption("--conversion-cache-max-size", action="store",
help="conversion cache maximum size in bytes")
group.addoption("--conversion-cache-report-misses",
action="store_true",
help="report conversion cache misses")
2 changes: 1 addition & 1 deletion lib/matplotlib/sphinxext/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
unicode_literals)

from matplotlib.testing.conftest import (
mpl_test_settings, pytest_addoption, pytest_configure, pytest_unconfigure,
mpl_test_settings, pytest_configure, pytest_unconfigure,
pytest_sessionfinish, pytest_terminal_summary)
9 changes: 0 additions & 9 deletions lib/matplotlib/testing/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@
from matplotlib.testing import _conversion_cache as ccache


def pytest_addoption(parser):
group = parser.getgroup("matplotlib", "matplotlib custom options")
group.addoption("--conversion-cache-max-size", action="store",
help="conversion cache maximum size in bytes")
group.addoption("--conversion-cache-report-misses",
action="store_true",
help="report conversion cache misses")


def pytest_configure(config):
matplotlib.use('agg')
matplotlib._called_from_pytest = True
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
unicode_literals)

from matplotlib.testing.conftest import (
mpl_test_settings, pytest_addoption, pytest_configure, pytest_unconfigure,
mpl_test_settings, pytest_configure, pytest_unconfigure,
pytest_sessionfinish, pytest_terminal_summary)

2 changes: 1 addition & 1 deletion lib/mpl_toolkits/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
unicode_literals)

from matplotlib.testing.conftest import (
mpl_test_settings, pytest_addoption, pytest_configure, pytest_unconfigure,
mpl_test_settings, pytest_configure, pytest_unconfigure,
pytest_sessionfinish, pytest_terminal_summary)
0