tests: run postgresql tests by default
This commit is contained in:
parent
240621635b
commit
eda9cf94d5
|
@ -1,9 +1,9 @@
|
|||
import pytest
|
||||
|
||||
def pytest_addoption(parser):
|
||||
parser.addoption('--run-postgresql', action='store_true',
|
||||
help='run postgresql tests')
|
||||
parser.addoption('--without-postgresql-tests', action='store_true',
|
||||
help='disable tests requiring postgresql')
|
||||
|
||||
def pytest_runtest_setup(item):
|
||||
if 'postgresql' in item.keywords and not item.config.option.run_postgresql:
|
||||
pytest.skip('skipped because no --run-postgresql')
|
||||
if 'postgresql' in item.keywords and item.config.option.without_postgresql_tests is True:
|
||||
pytest.skip('skipped (PostgreSQL are disabled on command line)')
|
||||
|
|
Loading…
Reference in New Issue