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

Method test_is_char_device_true

Lib/test/test_pathlib/test_pathlib.py:2787–2796  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2785 self.assertIs((P / 'fileA\x00').is_char_device(), False)
2786
2787 def test_is_char_device_true(self):
2788 # os.devnull should generally be a char device.
2789 P = self.cls(os.devnull)
2790 if not P.exists():
2791 self.skipTest("null device required")
2792 self.assertTrue(P.is_char_device())
2793 self.assertFalse(P.is_block_device())
2794 self.assertFalse(P.is_file())
2795 self.assertIs(self.cls(f'{os.devnull}\udfff').is_char_device(), False)
2796 self.assertIs(self.cls(f'{os.devnull}\x00').is_char_device(), False)
2797
2798 def test_is_mount(self):
2799 P = self.cls(self.base)

Callers

nothing calls this directly

Calls 9

skipTestMethod · 0.80
assertTrueMethod · 0.80
is_char_deviceMethod · 0.80
assertFalseMethod · 0.80
is_block_deviceMethod · 0.80
clsMethod · 0.45
existsMethod · 0.45
is_fileMethod · 0.45
assertIsMethod · 0.45

Tested by

no test coverage detected