Skip to content

Commit

Permalink
Skip test_postgres_terminate_connection for older PostgreSQL versions
Browse files Browse the repository at this point in the history
  • Loading branch information
fizyk committed Mar 18, 2021
1 parent 6024294 commit bc848f7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_postgresql.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
"""All tests for pytest-postgresql."""
import decimal

import psycopg2
import pytest

from tests.conftest import POSTGRESQL_VERSION

MAKE_Q = "CREATE TABLE test (id serial PRIMARY KEY, num integer, data varchar);"
SELECT_Q = "SELECT * FROM test;"
Expand Down Expand Up @@ -56,6 +59,10 @@ def test_rand_postgres_port(postgresql_rand):
assert postgresql_rand.status == psycopg2.extensions.STATUS_READY


@pytest.mark.skipif(
decimal.Decimal(POSTGRESQL_VERSION) < 10,
reason="Test query not supported in those postgresql versions, and soon will not be supported."
)
@pytest.mark.parametrize('_', range(2))
def test_postgres_terminate_connection(
postgresql_version, _):
Expand Down

0 comments on commit bc848f7

Please sign in to comment.