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

Method test_ismount_invalid_paths

Lib/test/test_ntpath.py:1410–1420  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1408 self.assertTrue(ntpath.ismount(b"\\\\localhost\\c$\\"))
1409
1410 def test_ismount_invalid_paths(self):
1411 ismount = ntpath.ismount
1412 self.assertFalse(ismount("c:\\\udfff"))
1413 if sys.platform == 'win32':
1414 self.assertRaises(ValueError, ismount, "c:\\\x00")
1415 self.assertRaises(ValueError, ismount, b"c:\\\x00")
1416 self.assertRaises(UnicodeDecodeError, ismount, b"c:\\\xff")
1417 else:
1418 self.assertFalse(ismount("c:\\\x00"))
1419 self.assertFalse(ismount(b"c:\\\x00"))
1420 self.assertFalse(ismount(b"c:\\\xff"))
1421
1422 def test_isreserved(self):
1423 self.assertFalse(ntpath.isreserved(''))

Callers

nothing calls this directly

Calls 3

assertFalseMethod · 0.80
ismountFunction · 0.50
assertRaisesMethod · 0.45

Tested by

no test coverage detected