Skip to content

Commit dc1f588

Browse files
committed
Add create_doc_example_fixture function to conftest
1 parent cfc01f3 commit dc1f588

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

e2e/conftest.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
__all__ = (
1818
"ShinyAppProc",
1919
"create_app_fixture",
20+
"create_doc_example_fixture",
2021
"create_example_fixture",
2122
"local_app",
2223
"run_shiny_app",
@@ -193,9 +194,17 @@ def fixture_func():
193194

194195

195196
def create_example_fixture(example_name: str, scope: str = "module"):
197+
"""Used to create app fixtures from apps in py-shiny/examples"""
196198
return create_app_fixture(here / "../examples" / example_name / "app.py", scope)
197199

198200

201+
def create_doc_example_fixture(example_name: str, scope: str = "module"):
202+
"""Used to create app fixtures from apps in py-shiny/shiny/examples"""
203+
return create_app_fixture(
204+
here / "../shiny/examples" / example_name / "app.py", scope
205+
)
206+
207+
199208
@pytest.fixture(scope="module")
200209
def local_app(request: pytest.FixtureRequest) -> Generator[ShinyAppProc, None, None]:
201210
sa = run_shiny_app(PurePath(request.path).parent / "app.py", wait_for_start=False)

0 commit comments

Comments
 (0)