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

Method test_bytes_like

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

Source from the content-addressed store, hash-verified

5029 os.fsencode(os.path.join(self.path, 'file.txt')))
5030
5031 def test_bytes_like(self):
5032 self.create_file("file.txt")
5033
5034 for cls in bytearray, memoryview:
5035 path_bytes = cls(os.fsencode(self.path))
5036 with self.assertRaises(TypeError):
5037 os.scandir(path_bytes)
5038
5039 @unittest.skipUnless(os.listdir in os.supports_fd,
5040 'fd support for listdir required for this test.')

Callers

nothing calls this directly

Calls 4

create_fileMethod · 0.95
clsClass · 0.50
assertRaisesMethod · 0.45
scandirMethod · 0.45

Tested by

no test coverage detected