From 51eefea3634ddca159c8351b5775a95d6ba6a7b0 Mon Sep 17 00:00:00 2001 From: Laura Liberda Date: Wed, 24 Feb 2021 17:46:00 +0100 Subject: [PATCH] test_download: adjust tests to the environments properly --- test/helper.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/helper.py b/test/helper.py index 07ad1cb34..334ff1f05 100644 --- a/test/helper.py +++ b/test/helper.py @@ -92,6 +92,12 @@ class FakeHDL(HaruhiDL): def gettestcases(include_onlymatching=False): for ie in haruhi_dl.extractor.gen_extractors(): for tc in ie.get_testcases(include_onlymatching): + # ignore non-playwright tests if HDL_TEST_PLAYWRIGHT_DOWNLOAD=1 + if os.environ.get('HDL_TEST_PLAYWRIGHT_DOWNLOAD') == '1' and not ie._REQUIRES_PLAYWRIGHT: + continue + # ignore playwright-requiring tests if not HDL_TEST_PLAYWRIGHT_DOWNLOAD=1 + if os.environ.get('HDL_TEST_PLAYWRIGHT_DOWNLOAD') != '1' and ie._REQUIRES_PLAYWRIGHT: + continue yield tc