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

Method test_bytes

Lib/test/test_os.py:5295–5305  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

5293 entry.stat(follow_symlinks=False)
5294
5295 def test_bytes(self):
5296 self.create_file("file.txt")
5297
5298 path_bytes = os.fsencode(self.path)
5299 entries = list(os.scandir(path_bytes))
5300 self.assertEqual(len(entries), 1, entries)
5301 entry = entries[0]
5302
5303 self.assertEqual(entry.name, b'file.txt')
5304 self.assertEqual(entry.path,
5305 os.fsencode(os.path.join(self.path, 'file.txt')))
5306
5307 def test_bytes_like(self):
5308 self.create_file("file.txt")

Callers

nothing calls this directly

Calls 7

create_fileMethod · 0.95
listClass · 0.85
lenFunction · 0.85
fsencodeMethod · 0.80
scandirMethod · 0.45
assertEqualMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected