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

Method test_with_stem_windows

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

Source from the content-addressed store, hash-verified

524
525 @needs_windows
526 def test_with_stem_windows(self):
527 P = self.cls
528 self.assertRaises(ValueError, P('c:').with_stem, 'd')
529 self.assertRaises(ValueError, P('c:/').with_stem, 'd')
530 self.assertRaises(ValueError, P('//My/Share').with_stem, 'd')
531 # NTFS alternate data streams
532 self.assertEqual(str(P('a').with_stem('d:')), '.\\d:')
533 self.assertEqual(str(P('a').with_stem('d:e')), '.\\d:e')
534 self.assertEqual(P('c:a/b').with_stem('d:'), P('c:a/d:'))
535 self.assertEqual(P('c:a/b').with_stem('d:e'), P('c:a/d:e'))
536
537 def test_with_stem_empty(self):
538 P = self.cls

Callers

nothing calls this directly

Calls 5

strFunction · 0.85
PClass · 0.70
assertRaisesMethod · 0.45
assertEqualMethod · 0.45
with_stemMethod · 0.45

Tested by

no test coverage detected