From 85d1bf70ba56486b95897250bf37b9f48ebab3a2 Mon Sep 17 00:00:00 2001 From: Matt Allen Date: Sun, 15 Sep 2024 14:52:23 -0500 Subject: [PATCH] Skip slow test for now --- .github/workflows/python-app.yml | 2 +- src/tester/test_unittest.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 52dc00a..11021c5 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -35,4 +35,4 @@ jobs: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with unittest run: | - python -m unittest discover -v -s ./src/tester + SKIP_SLOW=true python -m unittest discover -v -s ./src/tester diff --git a/src/tester/test_unittest.py b/src/tester/test_unittest.py index b4d73e2..b096b73 100644 --- a/src/tester/test_unittest.py +++ b/src/tester/test_unittest.py @@ -12,6 +12,8 @@ from cleaner import Cleaner from updater import Updater +SKIP_SLOW = os.getenv('SKIP_SLOW', 'false').lower().strip() == 'true' + def log(message, level='INFO'): # Provide message and info level (optional, defaulting to info) # configure the logger log = logging.getLogger(name="pid: " + str(os.getpid())) @@ -252,6 +254,7 @@ def test_scrape_results_page(self, #def scrape_case_data_pre2017() #def scrape_case_data_post2017() + @unittest.skipIf(SKIP_SLOW, "slow") def test_scrape_multiple_cases(self, county = 'hays', odyssey_version = 2003,