From ed4b988b1afa8ea4160366e41f616c8675b018dd Mon Sep 17 00:00:00 2001 From: Rich <33289025+rijobro@users.noreply.github.com> Date: Tue, 23 Feb 2021 15:05:26 +0000 Subject: [PATCH] determine if is_quick without using decorator Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com> --- tests/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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)