Test parsing file path with complex object specification.
(self, tmp_path)
| 72 | assert source.entrypoint == "app" |
| 73 | |
| 74 | def test_parse_complex_object(self, tmp_path): |
| 75 | """Test parsing file path with complex object specification.""" |
| 76 | test_file = tmp_path / "server.py" |
| 77 | test_file.write_text("# test server") |
| 78 | |
| 79 | # The implementation splits on the last colon, so file:module:app |
| 80 | # becomes file_path="file:module" and entrypoint="app" |
| 81 | # We need to create a file with a colon in the name for this test |
| 82 | complex_file = tmp_path / "server:module.py" |
| 83 | complex_file.write_text("# test server") |
| 84 | |
| 85 | source = FileSystemSource(path=f"{complex_file}:app") |
| 86 | assert Path(source.path).resolve() == complex_file.resolve() |
| 87 | assert source.entrypoint == "app" |
| 88 | |
| 89 | async def test_load_server_nonexistent(self): |
| 90 | """Test loading nonexistent file path exits.""" |
nothing calls this directly
no test coverage detected