From 14d532af265e35af33a28d61a68d545993fc5b78 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 29 Jan 2021 09:51:23 -0500 Subject: [PATCH] Use pytest.mark to selectively skip test. --- tempora/tests/test_timing.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tempora/tests/test_timing.py b/tempora/tests/test_timing.py index 6ac9f79..2b92e76 100644 --- a/tempora/tests/test_timing.py +++ b/tempora/tests/test_timing.py @@ -24,11 +24,9 @@ def test_IntervalGovernor(): func_under_test.assert_called_once_with('a') +@pytest.mark.skipif("not hasattr(time, 'tzset')") @pytest.fixture def alt_tz(monkeypatch): - if not hasattr(time, 'tzset'): - pytest.skip("tzset not available") - @contextlib.contextmanager def change(): val = 'AEST-10AEDT-11,M10.5.0,M3.5.0'