File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"""All tests for pytest-postgresql."""
22
3- import decimal
4-
53import pytest
64from psycopg import Connection
75from psycopg .pq import ConnStatus
86
97from pytest_postgresql .executor import PostgreSQLExecutor
108from pytest_postgresql .retry import retry
11- from tests .conftest import POSTGRESQL_VERSION
129
1310MAKE_Q = "CREATE TABLE test (id serial PRIMARY KEY, num integer, data varchar);"
1411SELECT_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 ))
6256def test_postgres_terminate_connection (postgresql2 : Connection , _ : int ) -> None :
6357 """Test that connections are terminated between tests.
You can’t perform that action at this time.
0 commit comments