From 4b833f58e56e31d12d818316a2adce614d3a1c16 Mon Sep 17 00:00:00 2001 From: "Mr. Outis" Date: Sun, 15 Dec 2019 13:09:23 -0600 Subject: [PATCH] tests/updater: use skipif for .check --- tests/unit/test_updater.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/unit/test_updater.py b/tests/unit/test_updater.py index 89ffc3236..d68e33d0a 100644 --- a/tests/unit/test_updater.py +++ b/tests/unit/test_updater.py @@ -45,11 +45,11 @@ def test_is_outdated(latest, current, result, updater): assert updater._is_outdated() == result +@pytest.mark.skipif( + os.getenv("TRAVIS_EVENT_TYPE") != "cron", + reason = "Only run on travis CRON to avoid generating too much logs" def test_check(updater, monkeypatch): - # NOTE: only test on travis CRON to avoid generating too much logs - if not os.getenv("TRAVIS_EVENT_TYPE") == "cron": - return - + monkeypatch.setenv("DVC_TEST", "true") monkeypatch.delenv("CI") updater.check()