From ab8a8ae53a68b765870e541cdc86d187bc6de6ae Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Tue, 21 Mar 2023 15:21:22 +0100 Subject: [PATCH] Pass reason to `@skip` decorator The decorator works without an argument as well, but that is an undocumented feature of `unittest.skip()` that is not understood by mypy and pytest. In the case of pytest, it ignored the decorated class during test collection, instead of collecting it and marking it as skipped. --- tests/test_fields/test_field_tracker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_fields/test_field_tracker.py b/tests/test_fields/test_field_tracker.py index 90f23709..a2e12c3d 100644 --- a/tests/test_fields/test_field_tracker.py +++ b/tests/test_fields/test_field_tracker.py @@ -870,7 +870,7 @@ def test_child_fields_not_tracked(self): self.assertTrue(self.tracker.has_changed('name2')) -@skip +@skip("has known failures") class AbstractModelTrackerTests(ModelTrackerTests): tracked_class = TrackedAbstract