Skip to content

Commit 3a22cc2

Browse files
committed
skip tiktok antibot test in CI
1 parent dbb3dfa commit 3a22cc2

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

tests/extractors/test_antibot_extractor_enricher.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
from .test_extractor_base import TestExtractorBase
66

77

8+
CI = os.getenv("GITHUB_ACTIONS", "") == "true"
9+
10+
811
class DummySB:
912
def __init__(self, url="", title="", visible_texts=None, visible_elements=None):
1013
self._url = url
@@ -51,56 +54,67 @@ class TestAntibotExtractorEnricher(TestExtractorBase):
5154

5255
@pytest.mark.download
5356
@pytest.mark.parametrize(
54-
"url,in_title,in_text,image_count,video_count",
57+
"url,in_title,in_text,image_count,video_count,skip_ci",
5558
[
5659
(
5760
"https://en.wikipedia.org/wiki/Western_barn_owl",
5861
"western barn owl",
5962
"Tyto alba",
6063
4,
6164
0,
65+
False,
6266
),
6367
(
6468
"https://www.bellingcat.com/news/2025/04/29/open-sources-show-myanmar-junta-airstrike-damages-despite-post-earthquake-ceasefire/",
6569
"open sources show myanmar",
6670
"Bellingcat has geolocated",
6771
5,
6872
0,
73+
False,
6974
),
7075
(
7176
"https://www.bellingcat.com/news/2025/03/27/gaza-israel-palestine-shot-killed-injured-destroyed-dangerous-drone-journalists-in-gaza/",
7277
"shot from above",
7378
"continued the work of Gazan journalists",
7479
5,
7580
1,
81+
False,
7682
),
7783
(
7884
"https://www.bellingcat.com/about/general-information",
7985
"general information",
8086
"Stichting Bellingcat",
8187
0, # SVGs are ignored
8288
0,
89+
False,
8390
),
8491
(
8592
"https://vk.com/wikipedia?from=search&w=wall-36156673_20451",
8693
"Hounds of Love",
8794
"16 сентября 1985 года лейблом EMI Records.",
8895
5,
8996
0,
97+
False,
9098
),
9199
(
92100
"https://www.tiktok.com/@tracy_2424/photo/7418200173953830162",
93101
"TikTok",
94102
"Dito ko lang",
95103
1,
96104
0,
105+
True,
97106
),
98107
],
99108
)
100-
def test_download_pages_with_media(self, setup_module, make_item, url, in_title, in_text, image_count, video_count):
109+
def test_download_pages_with_media(
110+
self, setup_module, make_item, url, in_title, in_text, image_count, video_count, skip_ci
111+
):
101112
"""
102113
Test downloading pages with media.
103114
"""
115+
if CI and skip_ci:
116+
pytest.skip("Skipping test in CI environment")
117+
104118
self.extractor = setup_module(
105119
self.extractor_module,
106120
self.config

0 commit comments

Comments
 (0)