MCPcopy Index your code
hub / github.com/RustPython/RustPython / get_entry

Method get_entry

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

Source from the content-addressed store, hash-verified

5188 self.assertEqual(entries['tgtdir'].is_junction(), False)
5189
5190 def get_entry(self, name):
5191 path = self.bytes_path if isinstance(name, bytes) else self.path
5192 entries = list(os.scandir(path))
5193 self.assertEqual(len(entries), 1)
5194
5195 entry = entries[0]
5196 self.assertEqual(entry.name, name)
5197 return entry
5198
5199 def create_file_entry(self, name='file.txt'):
5200 filename = self.create_file(name=name)

Callers 2

create_file_entryMethod · 0.95
test_removed_dirMethod · 0.95

Calls 5

isinstanceFunction · 0.85
listClass · 0.85
lenFunction · 0.85
scandirMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected