Directory and parts.
(self, invocation_path: Path)
| 167 | ) |
| 168 | |
| 169 | def test_dir(self, invocation_path: Path) -> None: |
| 170 | """Directory and parts.""" |
| 171 | assert resolve_collection_argument( |
| 172 | invocation_path, "src/pkg", 0 |
| 173 | ) == CollectionArgument( |
| 174 | path=invocation_path / "src/pkg", |
| 175 | parts=[], |
| 176 | parametrization=None, |
| 177 | module_name=None, |
| 178 | original_index=0, |
| 179 | ) |
| 180 | |
| 181 | with pytest.raises( |
| 182 | UsageError, match=r"directory argument cannot contain :: selection parts" |
| 183 | ): |
| 184 | resolve_collection_argument(invocation_path, "src/pkg::", 0) |
| 185 | |
| 186 | with pytest.raises( |
| 187 | UsageError, match=r"directory argument cannot contain :: selection parts" |
| 188 | ): |
| 189 | resolve_collection_argument(invocation_path, "src/pkg::foo::bar", 0) |
| 190 | |
| 191 | @pytest.mark.parametrize("namespace_package", [False, True]) |
| 192 | def test_pypath(self, namespace_package: bool, invocation_path: Path) -> None: |
nothing calls this directly
no test coverage detected