From 6a0bda8667ecb526b99722e1fad440dbdded082e Mon Sep 17 00:00:00 2001 From: Chuck McCallum Date: Mon, 9 Dec 2024 19:03:40 -0500 Subject: [PATCH] warn about breakpoint in playwright (#198) * warn about breakpoint in playwright * split line * plain pip install * sorry, meant to start new branch * skip coverage --- tests/test_app.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_app.py b/tests/test_app.py index 11c1927..f4e4c40 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -5,6 +5,15 @@ from shiny.pytest import create_app_fixture +bp = "BREAKPOINT()".lower() +if bp in Path(__file__).read_text(): + raise Exception( # pragma: no cover + 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"