summaryrefslogtreecommitdiff
path: root/conftest.py
blob: 445657d24b3cd5808072c225f2ac75afd0187e21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""py.test plugin configuration."""

def pytest_addoption(parser):
    """Add options for filtering which file tests run.

    This has to be done in the project root; py.test doesn't (and can't)
    recursively look for conftest.py files until after it's parsed the command
    line.
    """
    parser.addoption('--include-ruby',
        help='run tests imported from Ruby and sassc, most of which fail',
        action='store_true',
        dest='include_ruby',
    )

    parser.addoption('--test-file-filter',
        help='comma-separated regexes to select test files',
        action='store',
        type='string',
        dest='test_file_filter',
        default=None,
    )