diff options
author | Eevee <eevee.git@veekun.com> | 2013-05-10 10:56:28 -0700 |
---|---|---|
committer | Eevee <eevee.git@veekun.com> | 2013-05-23 13:43:24 -0700 |
commit | 4b0a89c6ed7dcadb2ed34dd79e3a5ac3b12d9db3 (patch) | |
tree | 4a30624f4fadb4cea3a4a78cd77df9003ba2dc05 /conftest.py | |
parent | da4cc9125052473f6b149dc673bd212275509ec6 (diff) | |
download | pyscss-4b0a89c6ed7dcadb2ed34dd79e3a5ac3b12d9db3.tar.gz |
Add py.test wizardry for running a subset of file tests. Fixes #134.
Diffstat (limited to 'conftest.py')
-rw-r--r-- | conftest.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/conftest.py b/conftest.py new file mode 100644 index 0000000..01b04d1 --- /dev/null +++ b/conftest.py @@ -0,0 +1,16 @@ +"""py.test plugin configuration.""" + +def pytest_addoption(parser): + """Add an option for filtering the 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('--test-file-filter', + help='comma-separated regexes to select test files', + action='store', + type='string', + dest='test_file_filter', + default=None, + ) |