From d6550fd22034f5c3afdeacf8d6e7e4a9a76f7531 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 3 Oct 2014 11:36:47 +0200 Subject: [PATCH] tests: run postgresql tests by default --- tests/conftest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 20a2ebe..828a524 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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)') -- 2.1.1