Example #1
0
def pytest_configure(config):
    matplotlib._called_from_pytest = True
    matplotlib._init_tests()

    if config.getoption('--no-pep8'):
        default_test_modules.remove('matplotlib.tests.test_coding_standards')
        IGNORED_TESTS['matplotlib'] += 'test_coding_standards'
Example #2
0
def pytest_configure(config):
    # config is initialized here rather than in pytest.ini so that `pytest
    # --pyargs matplotlib` (which would not find pytest.ini) works.  The only
    # entries in pytest.ini set minversion (which is checked earlier),
    # testpaths/python_files, as they are required to properly find the tests
    for key, value in [
        ("markers", "flaky: (Provided by pytest-rerunfailures.)"),
        ("markers", "timeout: (Provided by pytest-timeout.)"),
        ("markers", "backend: Set alternate Matplotlib backend temporarily."),
        ("markers",
         "style: Set alternate Matplotlib style temporarily (deprecated)."),
        ("markers", "baseline_images: Compare output against references."),
        ("markers", "pytz: Tests that require pytz to be installed."),
        ("markers", "network: Tests that reach out to the network."),
        ("filterwarnings", "error"),
        ("filterwarnings",
         "ignore:.*The py23 module has been deprecated:DeprecationWarning"),
        ("filterwarnings", r"ignore:DynamicImporter.find_spec\(\) not found; "
         r"falling back to find_module\(\):ImportWarning"),
    ]:
        config.addinivalue_line(key, value)

    matplotlib.use('agg', force=True)
    matplotlib._called_from_pytest = True
    matplotlib._init_tests()
Example #3
0
def pytest_configure(config):
    matplotlib._called_from_pytest = True
    matplotlib._init_tests()

    if config.getoption('--no-pep8'):
        default_test_modules.remove('matplotlib.tests.test_coding_standards')
        IGNORED_TESTS['matplotlib'] += 'test_coding_standards'
Example #4
0
def run(extra_args):
    from nose.plugins import multiprocess

    matplotlib._init_tests()

    # Nose doesn't automatically instantiate all of the plugins in the
    # child processes, so we have to provide the multiprocess plugin with
    # a list.
    plugins = matplotlib._get_extra_test_plugins()
    multiprocess._instantiate_plugins = plugins

    nose.main(addplugins=[x() for x in plugins],
              defaultTest=default_test_modules,
              argv=sys.argv + extra_args)
Example #5
0
def pytest_configure(config):
    # config is initialized here rather than in pytest.ini so that `pytest
    # --pyargs matplotlib` (which would not find pytest.ini) works.  The only
    # entries in pytest.ini set minversion (which is checked earlier),
    # testpaths/python_files, as they are required to properly find the tests
    for key, value in [
        ("markers", "flaky: (Provided by pytest-rerunfailures.)"),
        ("markers", "timeout: (Provided by pytest-timeout.)"),
        ("markers", "backend: Set alternate Matplotlib backend temporarily."),
        ("markers", "style: Set alternate Matplotlib style temporarily."),
        ("markers", "baseline_images: Compare output against references."),
        ("markers", "pytz: Tests that require pytz to be installed."),
        ("filterwarnings", "error"),
    ]:
        config.addinivalue_line(key, value)

    matplotlib.use('agg', force=True)
    matplotlib._called_from_pytest = True
    matplotlib._init_tests()
Example #6
0
def pytest_configure(config):
    matplotlib.use('agg', force=True)
    matplotlib._called_from_pytest = True
    matplotlib._init_tests()
Example #7
0
def pytest_configure(config):
    matplotlib.use('agg')
    matplotlib._called_from_pytest = True
    matplotlib._init_tests()
Example #8
0
def pytest_configure(config):
    matplotlib._called_from_pytest = True
    matplotlib._init_tests()

    if config.getoption('--no-pep8'):
        IGNORED_TESTS['matplotlib'] += 'test_coding_standards'