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

Method test_fspath_protocol_bytes

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

Source from the content-addressed store, hash-verified

4947 self.assertEqual(os.fspath(entry), os.path.join(self.path, 'file.txt'))
4948
4949 def test_fspath_protocol_bytes(self):
4950 bytes_filename = os.fsencode('bytesfile.txt')
4951 bytes_entry = self.create_file_entry(name=bytes_filename)
4952 fspath = os.fspath(bytes_entry)
4953 self.assertIsInstance(fspath, bytes)
4954 self.assertEqual(fspath,
4955 os.path.join(os.fsencode(self.path),bytes_filename))
4956
4957 def test_removed_dir(self):
4958 path = os.path.join(self.path, 'dir')

Callers

nothing calls this directly

Calls 4

create_file_entryMethod · 0.95
assertIsInstanceMethod · 0.80
assertEqualMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected