determine if is_quick without using decorator
@@ -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)
