Skip to content
Myr

Merge pull request #1030 from rillian/PytestUnknownMarkWarning

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fix pytest unknown mark warnings

authored by David Lord · committed by GitHub · parents 94cecd4, 6661be0 · Browse files · 2 files+44 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+44 added−2 removed

  • tests:+43 added−1 removed
  • other:+1 added−1 removed

2 files+44 added−2 removed

modified:tests/conftest.py+43 added-1 removed
14 unmodified lines
15from jinja2.utils import have_async_gen16from jinja2 import Environment171819def pytest_ignore_collect(path, config):19def pytest_ignore_collect(path):20 if 'async' in path.basename and not have_async_gen:21 return True22 return False232425def pytest_configure(config):26 '''Register custom marks for test categories.'''27 custom_markers = [28 'api',29 'byte_code_cache',30 'core_tags',31 'debug',32 'escapeUrlizeTarget',33 'ext',34 'extended',35 'filter',36 'for_loop',37 'helpers',38 'if_condition',39 'imports',40 'includes',41 'inheritance',42 'lexer',43 'lexnparse',44 'loaders',45 'lowlevel',46 'lrucache',47 'lstripblocks',48 'macros',49 'meta',50 'moduleloader',51 'parser',52 'regression',53 'sandbox',54 'set',55 'streaming',56 'syntax',57 'test_tests',58 'tokenstream',59 'undefined',60 'utils',61 'with_',62 ]63 for mark in custom_markers:64 config.addinivalue_line('markers', mark + ': test category')656667@pytest.fixture68def env():69 '''returns a new environment.70 '''
49 unmodified lines
modified:tox.ini+1 added-1 removed
7 unmodified lines
8[testenv]9deps =10 coverage11 pytest12commands = coverage run -p -m pytest --tb=short --basetemp={envtmpdir} {posargs}12commands = coverage run -p -m pytest --tb=short -Werror --basetemp={envtmpdir} {posargs}1314[testenv:docs-html]15deps =16 Sphinx
19 unmodified lines