From e4a7118907b801a1adbb762fd4cecef6823ee761 Mon Sep 17 00:00:00 2001 From: Hu Jialun Date: Fri, 19 Nov 2021 01:22:48 +0800 Subject: [PATCH 1/2] Fix ignored test cases Tests under this class seem not to be run due to pytest discovery rules, which requires classes to be prefixed with Test. This also seems to be hiding potential problems with non-PostgreSQL database systems. --- tests/types/test_date_range.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/types/test_date_range.py b/tests/types/test_date_range.py index dcd7f182..63c4b1e0 100644 --- a/tests/types/test_date_range.py +++ b/tests/types/test_date_range.py @@ -42,7 +42,7 @@ def init_models(Booking): @pytest.mark.skipif('intervals is None') -class DateRangeTestCase: +class TestDateRange: def test_nullify_range(self, create_booking): booking = create_booking(None) assert booking.during is None From 045373a45af5d30ab5edea07a335449d02e71e91 Mon Sep 17 00:00:00 2001 From: Hu Jialun Date: Tue, 29 Mar 2022 17:18:02 +0800 Subject: [PATCH 2/2] Rename child class --- tests/types/test_date_range.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/types/test_date_range.py b/tests/types/test_date_range.py index 63c4b1e0..90ad8627 100644 --- a/tests/types/test_date_range.py +++ b/tests/types/test_date_range.py @@ -84,7 +84,7 @@ def test_integer_coercion(self, Booking): @pytest.mark.usefixtures('postgresql_dsn') -class TestDateRangeOnPostgres(DateRangeTestCase): +class TestDateRangeOnPostgres(TestDateRange): @pytest.mark.parametrize( ('date_range', 'length'), (