From b0acca3d78b9bb1dc2c9cb7a26cfc95d5eebe6ca Mon Sep 17 00:00:00 2001 From: Chuck McCallum Date: Thu, 5 Dec 2024 16:01:38 -0500 Subject: [PATCH] warn about breakpoint in playwright --- tests/test_app.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test_app.py b/tests/test_app.py index 11c1927..b0ed531 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -5,6 +5,14 @@ from shiny.pytest import create_app_fixture +bp = "BREAKPOINT()".lower() +if bp in Path(__file__).read_text(): + raise Exception( + f"Instead of `{bp}`, use `page.pause()` in playwright tests. " + "See https://playwright.dev/python/docs/debug#run-a-test-from-a-specific-breakpoint" + ) + + demo_app = create_app_fixture(Path(__file__).parent / "fixtures/demo_app.py") default_app = create_app_fixture(Path(__file__).parent / "fixtures/default_app.py") tooltip = "#choose_csv_demo_tooltip_ui svg"