Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 4 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["setuptools>=60", "wheel", "setuptools_scm>=8.0"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
packages = {find = {include = ["shiny", "shiny.*"]}}
packages = { find = { include = ["shiny", "shiny.*"] } }

[tool.setuptools_scm]
write_to = "shiny/_version.py"
Expand All @@ -12,13 +12,11 @@ local_scheme = "no-local-version"
[project]
name = "shiny"
dynamic = ["version"]
authors = [
{name = "Winston Chang", email = "[email protected]"},
]
authors = [{ name = "Winston Chang", email = "[email protected]" }]
description = "A web development framework for Python."
readme = "README.md"
requires-python = ">=3.8"
license = {text = "MIT"}
license = { text = "MIT" }
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
Expand Down Expand Up @@ -67,7 +65,7 @@ test = [
"psutil",
"astropy",
"suntime",
"timezonefinder",
"timezonefinder ; platform_system != 'Windows'",
"ipyleaflet",
"shinywidgets",
"seaborn",
Expand Down
26 changes: 26 additions & 0 deletions tests/playwright/examples/test_examples.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,35 @@
import sys

import pytest
from example_apps import get_apps, reruns, reruns_delay, validate_example
from playwright.sync_api import Page

is_windows = sys.platform.startswith("win")


@pytest.mark.flaky(reruns=reruns, reruns_delay=reruns_delay)
@pytest.mark.parametrize("ex_app_path", get_apps("examples"))
def test_examples(page: Page, ex_app_path: str) -> None:

skip_on_windows_with_timezonefinder(ex_app_path)

validate_example(page, ex_app_path)


def skip_on_windows_with_timezonefinder(ex_app_path: str) -> None:
if not is_windows:
return
if ex_app_path != "examples/airmass/app.py":
return

try:
import timezonefinder # noqa: F401 # pyright: ignore

# Future proofing: if timezonefinder is actually available on windows, raise an error
raise RuntimeError(
"This code believes timezonefinder is not available on windows. Please remove this check if it is no longer true."
)
except ImportError:
pytest.skip(
"timezonefinder has difficulty compiling on windows. Skipping example app. posit-dev/py-shiny#1651"
)
Loading