MCPcopy
hub / github.com/python-trio/trio / test_iterdir

Function test_iterdir

src/trio/_tests/test_path.py:239–250  ·  view source on GitHub ↗
(path: trio.Path)

Source from the content-addressed store, hash-verified

237
238
239async def test_iterdir(path: trio.Path) -> None:
240 # Populate a directory
241 await path.mkdir()
242 await (path / "foo").mkdir()
243 await (path / "bar.txt").write_bytes(b"")
244
245 entries = set()
246 for entry in await path.iterdir():
247 assert isinstance(entry, trio.Path)
248 entries.add(entry.name)
249
250 assert entries == {"bar.txt", "foo"}
251
252
253async def test_classmethods() -> None:

Callers

nothing calls this directly

Calls 1

addMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…