File: conftest.py

package info (click to toggle)
python-parsel 1.6.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 332 kB
  • sloc: python: 1,467; makefile: 213; sh: 8
file content (8 lines) | stat: -rw-r--r-- 346 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
def pytest_collection_modifyitems(session, config, items):
    # Avoid executing tests when executing `--flake8` flag (pytest-flake8)
    try:
        from pytest_flake8 import Flake8Item
        if config.getoption('--flake8'):
            items[:] = [item for item in items if isinstance(item, Flake8Item)]
    except ImportError:
        pass