Skip to content

Commit 4cce0bf

Browse files
committed
fixup: group terminate connection together
1 parent 5c567cf commit 4cce0bf

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

tests/test_postgresql.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
"""All tests for pytest-postgresql."""
22

3-
import decimal
4-
53
import pytest
64
from psycopg import Connection
75
from psycopg.pq import ConnStatus
86

97
from pytest_postgresql.executor import PostgreSQLExecutor
108
from pytest_postgresql.retry import retry
11-
from tests.conftest import POSTGRESQL_VERSION
129

1310
MAKE_Q = "CREATE TABLE test (id serial PRIMARY KEY, num integer, data varchar);"
1411
SELECT_Q = "SELECT * FROM test_load;"
@@ -54,10 +51,7 @@ def test_rand_postgres_port(postgresql2: Connection) -> None:
5451
assert postgresql2.info.status == ConnStatus.OK
5552

5653

57-
@pytest.mark.skipif(
58-
decimal.Decimal(POSTGRESQL_VERSION) < 10,
59-
reason="Test query not supported in those postgresql versions, and soon will not be supported.",
60-
)
54+
@pytest.mark.xdist_group(name="terminate_connection")
6155
@pytest.mark.parametrize("_", range(2))
6256
def test_postgres_terminate_connection(postgresql2: Connection, _: int) -> None:
6357
"""Test that connections are terminated between tests.

0 commit comments

Comments
 (0)