Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down