diff --git a/tests/utils.py b/tests/utils.py index 8de82bee82..1adc20d280 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -47,12 +47,16 @@ def test_pretrained_networks(network, input_param, device): return net +def test_is_quick(): + return os.environ.get(quick_test_var, "").lower() == "true" + + def skip_if_quick(obj): """ Skip the unit tests if environment variable `quick_test_var=true`. For example, the user can skip the relevant tests by setting ``export QUICKTEST=true``. """ - is_quick = os.environ.get(quick_test_var, "").lower() == "true" + is_quick = test_is_quick() return unittest.skipIf(is_quick, "Skipping slow tests")(obj)