Commit a1a476fa authored by Georges Racinet's avatar Georges Racinet 🦑
Browse files

Introducing `sql` test marker

Consistent with the Heptapod classes implementing
the `psql` method, tests with this marker will be
skipped for remote and unspecified source instances.
parent 484c7a3cf9c5
......@@ -137,6 +137,10 @@ def pytest_configure(config):
"services: mark test as needing services "
"management "
"sql: mark test as needing to "
"perform SQL statements "
# if we regroup the tests with separate fixtures for the two
# modes, these two will become useless:
......@@ -162,6 +166,8 @@ def pytest_collection_modifyitems(config, items):
"running these tests")
skip_services = pytest.mark.skip(
reason="needs to manage Heptapod services")
skip_sql = pytest.mark.skip(
reason="needs to perform SQL statements")
skip_hg_git = pytest.mark.skip(reason="needs non hg-native mode")
skip_hg_native = pytest.mark.skip(reason="needs hg-native mode")
skip_prod_server = pytest.mark.skip(
......@@ -185,6 +191,8 @@ def pytest_collection_modifyitems(config, items):
if "services" in item.keywords and (remote or source_install):
if "sql" in item.keywords and (remote or source_install):
if "hg_git" in item.keywords and hg_native:
if "hg_native" in item.keywords and not hg_native:
......@@ -4,5 +4,6 @@ fs_access = pytest.mark.fs_access
docker = pytest.mark.docker
reverse_call = pytest.mark.reverse_call
services =
sql = pytest.mark.sql
hg_git = pytest.mark.hg_git
prod_server = pytest.mark.prod_server
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment