(self, touch_soon: Callable[[Path], None])
| 244 | |
| 245 | @pytest.mark.parametrize("reloader_class", [pytest.param(WatchFilesReload, marks=skip_non_linux)]) |
| 246 | def test_override_defaults(self, touch_soon: Callable[[Path], None]) -> None: # pragma: py-not-linux |
| 247 | dotted_file = self.reload_path / ".dotted" |
| 248 | dotted_dir_file = self.reload_path / ".dotted_dir" / "file.txt" |
| 249 | python_file = self.reload_path / "main.py" |
| 250 | |
| 251 | with as_cwd(self.reload_path): |
| 252 | config = Config( |
| 253 | app="tests.test_config:asgi_app", |
| 254 | reload=True, |
| 255 | # We need to add *.txt otherwise no regular files will match |
| 256 | reload_includes=[".*", "*.txt"], |
| 257 | reload_excludes=["*.py"], |
| 258 | ) |
| 259 | reloader = self._setup_reloader(config) |
| 260 | |
| 261 | assert self._reload_tester(touch_soon, reloader, dotted_file) |
| 262 | assert self._reload_tester(touch_soon, reloader, dotted_dir_file) |
| 263 | assert not self._reload_tester(touch_soon, reloader, python_file) |
| 264 | |
| 265 | reloader.shutdown() |
| 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 |
nothing calls this directly
no test coverage detected