Skip to content

Commit 4b833f5

Browse files
author
Mr. Outis
committed
tests/updater: use skipif for .check
1 parent c09c3ae commit 4b833f5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/unit/test_updater.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ def test_is_outdated(latest, current, result, updater):
4545
assert updater._is_outdated() == result
4646

4747

48+
@pytest.mark.skipif(
49+
os.getenv("TRAVIS_EVENT_TYPE") != "cron",
50+
reason = "Only run on travis CRON to avoid generating too much logs"
4851
def test_check(updater, monkeypatch):
49-
# NOTE: only test on travis CRON to avoid generating too much logs
50-
if not os.getenv("TRAVIS_EVENT_TYPE") == "cron":
51-
return
52-
52+
monkeypatch.setenv("DVC_TEST", "true")
5353
monkeypatch.delenv("CI")
5454

5555
updater.check()

0 commit comments

Comments
 (0)