Start PlotlyLocaleApp at tmp_path via AppHarness. Args: app_harness_env: The AppHarness environment to use for the test. tmp_path_factory: pytest tmp_path_factory fixture Yields: running AppHarness instance
(
app_harness_env: type[AppHarness], tmp_path_factory
)
| 62 | |
| 63 | @pytest.fixture(scope="module") |
| 64 | def plotly_locale_app( |
| 65 | app_harness_env: type[AppHarness], tmp_path_factory |
| 66 | ) -> Generator[AppHarness, None, None]: |
| 67 | """Start PlotlyLocaleApp at tmp_path via AppHarness. |
| 68 | |
| 69 | Args: |
| 70 | app_harness_env: The AppHarness environment to use for the test. |
| 71 | tmp_path_factory: pytest tmp_path_factory fixture |
| 72 | |
| 73 | Yields: |
| 74 | running AppHarness instance |
| 75 | """ |
| 76 | with app_harness_env.create( |
| 77 | root=tmp_path_factory.mktemp("plotly_locale"), |
| 78 | app_name=f"plotlylocaleapp_{app_harness_env.__name__.lower()}", |
| 79 | app_source=PlotlyLocaleApp, |
| 80 | ) as harness: |
| 81 | assert harness.app_instance is not None, "app is not running" |
| 82 | yield harness |
| 83 | |
| 84 | |
| 85 | # (plot box id, expected "Autoscale" modebar title, expected "Pan" modebar title). |