MCPcopy
hub / github.com/encode/uvicorn / test_explicit_paths

Method test_explicit_paths

tests/supervisors/test_reload.py:268–285  ·  view source on GitHub ↗
(self, touch_soon: Callable[[Path], None])

Source from the content-addressed store, hash-verified

266
267 @pytest.mark.parametrize("reloader_class", [pytest.param(WatchFilesReload, marks=skip_non_linux)])
268 def test_explicit_paths(self, touch_soon: Callable[[Path], None]) -> None: # pragma: py-not-linux
269 dotted_file = self.reload_path / ".dotted"
270 non_dotted_file = self.reload_path / "ext" / "ext.jpg"
271 python_file = self.reload_path / "main.py"
272
273 with as_cwd(self.reload_path):
274 config = Config(
275 app="tests.test_config:asgi_app",
276 reload=True,
277 reload_includes=[".dotted", "ext/ext.jpg"],
278 )
279 reloader = self._setup_reloader(config)
280
281 assert self._reload_tester(touch_soon, reloader, dotted_file)
282 assert self._reload_tester(touch_soon, reloader, non_dotted_file)
283 assert self._reload_tester(touch_soon, reloader, python_file)
284
285 reloader.shutdown()
286
287 @pytest.mark.skipif(WatchFilesReload is None, reason="watchfiles not available")
288 @pytest.mark.parametrize("reloader_class", [WatchFilesReload])

Callers

nothing calls this directly

Calls 5

_setup_reloaderMethod · 0.95
_reload_testerMethod · 0.95
as_cwdFunction · 0.90
ConfigClass · 0.90
shutdownMethod · 0.45

Tested by

no test coverage detected