MCPcopy Index your code
hub / github.com/python/cpython / test_iterdir

Method test_iterdir

Lib/test/test_pathlib/test_read.py:96–102  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

94 self.assertEqual(p.read_text(encoding='utf-8', newline='\r\n'), 'abcde\r\nfghlk\n\rmnopq')
95
96 def test_iterdir(self):
97 expected = ['dirA', 'dirB', 'dirC', 'fileA']
98 if self.ground.can_symlink:
99 expected += ['linkA', 'linkB', 'brokenLink', 'brokenLinkLoop']
100 expected = {self.root.joinpath(name) for name in expected}
101 actual = set(self.root.iterdir())
102 self.assertEqual(actual, expected)
103
104 def test_iterdir_nodir(self):
105 p = self.root / 'fileA'

Callers

nothing calls this directly

Calls 4

setFunction · 0.85
joinpathMethod · 0.45
iterdirMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected