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

Method get_entry

Lib/test/test_os/test_os.py:4914–4921  ·  view source on GitHub ↗
(self, name)

Source from the content-addressed store, hash-verified

4912 self.assertEqual(entries['tgtdir'].is_junction(), False)
4913
4914 def get_entry(self, name):
4915 path = self.bytes_path if isinstance(name, bytes) else self.path
4916 entries = list(os.scandir(path))
4917 self.assertEqual(len(entries), 1)
4918
4919 entry = entries[0]
4920 self.assertEqual(entry.name, name)
4921 return entry
4922
4923 def create_file_entry(self, name='file.txt'):
4924 filename = self.create_file(name=name)

Callers 2

create_file_entryMethod · 0.95
test_removed_dirMethod · 0.95

Calls 3

listClass · 0.85
scandirMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected