Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions tests/playwright/examples/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -34,33 +33,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
Loading