Given a file/module that does not exist raises UsageError.
(self, invocation_path: Path)
| 172 | ) |
| 173 | |
| 174 | def test_does_not_exist(self, invocation_path: Path) -> None: |
| 175 | """Given a file/module that does not exist raises UsageError.""" |
| 176 | with pytest.raises( |
| 177 | UsageError, match=re.escape("file or directory not found: foobar") |
| 178 | ): |
| 179 | resolve_collection_argument(invocation_path, "foobar") |
| 180 | |
| 181 | with pytest.raises( |
| 182 | UsageError, |
| 183 | match=re.escape( |
| 184 | "module or package not found: foobar (missing __init__.py?)" |
| 185 | ), |
| 186 | ): |
| 187 | resolve_collection_argument(invocation_path, "foobar", as_pypath=True) |
| 188 | |
| 189 | def test_absolute_paths_are_resolved_correctly(self, invocation_path: Path) -> None: |
| 190 | """Absolute paths resolve back to absolute paths.""" |
nothing calls this directly
no test coverage detected