From 8d256b03c359e921049bbaca74363daabae020a9 Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Fri, 27 Sep 2024 14:46:44 -0400 Subject: [PATCH 1/2] revert #1678 where airmass skips on python 3.9 --- tests/playwright/examples/test_examples.py | 30 ---------------------- 1 file changed, 30 deletions(-) diff --git a/tests/playwright/examples/test_examples.py b/tests/playwright/examples/test_examples.py index 536f1416b..63645fb33 100644 --- a/tests/playwright/examples/test_examples.py +++ b/tests/playwright/examples/test_examples.py @@ -34,33 +34,3 @@ def skip_on_windows_with_timezonefinder(ex_app_path: str) -> None: pytest.skip( "timezonefinder has difficulty compiling on windows. Skipping example app. posit-dev/py-shiny#1651" ) - - -def skip_airmass_on_3_9(ex_app_path: str) -> None: - print(ex_app_path) - if ex_app_path != "examples/airmass/app.py": - return - - import sys - - if sys.version_info[:2] != (3, 9): - return - - try: - # Astropy loads `numpy` at run time - import astropy.coordinates as _ # pyright: ignore # noqa: F401 - import astropy.units as __ # pyright: ignore # noqa: F401 - - # Future proofing: if astropy is _actually_ loading, raise an error - raise RuntimeError( - "This code believes astropy and numpy have difficulty loading on python 3.9. Please remove this check if it is no longer true." - ) - except AttributeError as e: - if "numpy" in str(e) and "product" in str(e): - pytest.skip( - "astropy and numpy has difficulty loading on python 3.9. Skipping example app: airmass. posit-dev/py-shiny#1678" - ) - return - - # Future proofing: if the error is not what we expect, raise it - raise e From b10742064e2aaa2d8a62e22a587dc8d20931200c Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Fri, 27 Sep 2024 15:59:00 -0400 Subject: [PATCH 2/2] Update test_examples.py --- tests/playwright/examples/test_examples.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/playwright/examples/test_examples.py b/tests/playwright/examples/test_examples.py index 63645fb33..6977f77c8 100644 --- a/tests/playwright/examples/test_examples.py +++ b/tests/playwright/examples/test_examples.py @@ -12,7 +12,6 @@ def test_examples(page: Page, ex_app_path: str) -> None: skip_on_windows_with_timezonefinder(ex_app_path) - skip_airmass_on_3_9(ex_app_path) validate_example(page, ex_app_path)