MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_dir

Method test_dir

testing/test_main.py:137–152  ·  view source on GitHub ↗

Directory and parts.

(self, invocation_path: Path)

Source from the content-addressed store, hash-verified

135 ) == (invocation_path / "src/pkg/test.py", ["foo", "bar", ""])
136
137 def test_dir(self, invocation_path: Path) -> None:
138 """Directory and parts."""
139 assert resolve_collection_argument(invocation_path, "src/pkg") == (
140 invocation_path / "src/pkg",
141 [],
142 )
143
144 with pytest.raises(
145 UsageError, match=r"directory argument cannot contain :: selection parts"
146 ):
147 resolve_collection_argument(invocation_path, "src/pkg::")
148
149 with pytest.raises(
150 UsageError, match=r"directory argument cannot contain :: selection parts"
151 ):
152 resolve_collection_argument(invocation_path, "src/pkg::foo::bar")
153
154 def test_pypath(self, invocation_path: Path) -> None:
155 """Dotted name and parts."""

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected