def test_reloader_sys_path(
    tmp_path: Path, dev_server: StartDevServer, reloader_type: str
) -> None:
    """This tests the general behavior of the reloader. It also tests
    that fixing an import error triggers a reload, not just Python
    retrying the failed import.
    """
    real_path = tmp_path / "real_app.py"
    real_path.write_text("syntax error causes import error")

    client = dev_server("reloader", reloader_type=reloader_type)
    assert client.request().status == 500

    shutil.copyfile(Path(__file__).parent / "live_apps" / "standard_app.py", real_path)
    client.wait_for_log(f"Detected change in {str(real_path)!r}")
    client.wait_for_reload()
    assert client.request().status == 200
This tests the general behavior of the reloader. It also tests
    that fixing an import error triggers a reload, not just Python
    retrying the failed import.
    
tests/test_serving.py