diff --git a/requirements-test.txt b/requirements-test.txt --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,6 +1,6 @@ pytest pytest-mock requests-mock -hypothesis >= 3.11.0, < 6 +hypothesis >= 3.11.0 pre-commit pytz diff --git a/swh/core/db/tests/test_db.py b/swh/core/db/tests/test_db.py --- a/swh/core/db/tests/test_db.py +++ b/swh/core/db/tests/test_db.py @@ -12,7 +12,9 @@ from unittest.mock import MagicMock, Mock import uuid -from hypothesis import given, strategies +from hypothesis import HealthCheck +from hypothesis import __version_info__ as hypothesis_version +from hypothesis import given, settings, strategies from hypothesis.extra.pytz import timezones import psycopg2 import pytest @@ -282,6 +284,11 @@ assert EXPECTED_ROW_OUT == output[0] +@settings( + suppress_health_check=[HealthCheck.function_scoped_fixture] # type: ignore + if hypothesis_version >= (5, 49) + else [] +) @given(db_rows) def test_db_copy_to(db_with_data, data): items = [dict(zip(COLUMNS, item)) for item in data]