Skip to content

Commit 161e3e7

Browse files
committed
[tripadvisor] add test retries
1 parent 2ce6f66 commit 161e3e7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tripadvisor-scraper/test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def require_min_presence(items, key, min_perc=0.1):
2929
)
3030

3131
@pytest.mark.asyncio
32+
@pytest.mark.flaky(reruns=3, reruns_delay=30)
3233
async def test_hotel_scraping():
3334
result_hotel = await tripadvisor.scrape_hotel(
3435
"https://www.tripadvisor.com/Hotel_Review-g190327-d264936-Reviews-1926_Hotel_Spa-Sliema_Island_of_Malta.html",
@@ -63,6 +64,7 @@ async def test_hotel_scraping():
6364
require_min_presence(result_hotel["reviews"], k, min_perc=review_schema[k].get("min_presence", 0.1))
6465

6566
@pytest.mark.asyncio
67+
@pytest.mark.flaky(reruns=3, reruns_delay=30)
6668
async def test_location_data_scraping():
6769
result_location = await tripadvisor.scrape_location_data(query="Malta")
6870
assert len(result_location) > 10

0 commit comments

Comments
 (0)