Skip to content

Commit 5aae7d7

Browse files
author
Zengxu Yang
committed
Add a flag for scraper tests.
1 parent 772ef97 commit 5aae7d7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/tools/test_scraper.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
import os
2+
import pytest
13
from leetcode_py.tools.scraper import LeetCodeScraper
24

5+
# Check if we should run real API tests
6+
# Default to 'false' so CI skips them automatically
7+
RUN_REAL = os.getenv("LEETCODE_REAL_TESTS", "false").lower() == "true"
38

9+
@pytest.mark.skipif(not RUN_REAL, reason="Skipping real API tests. Set LEETCODE_REAL_TESTS=true to run.")
410
class TestLeetCodeScraper:
511
"""Test cases for LeetCodeScraper with real API calls."""
612

0 commit comments

Comments
 (0)