Lines Matching refs:with_name
548 self.assertEqual(P('a/b').with_name('d.xml'), P('a/d.xml'))
549 self.assertEqual(P('/a/b').with_name('d.xml'), P('/a/d.xml'))
550 self.assertEqual(P('a/b.py').with_name('d.xml'), P('a/d.xml'))
551 self.assertEqual(P('/a/b.py').with_name('d.xml'), P('/a/d.xml'))
552 self.assertEqual(P('a/Dot ending.').with_name('d.xml'), P('a/d.xml'))
553 self.assertEqual(P('/a/Dot ending.').with_name('d.xml'), P('/a/d.xml'))
554 self.assertRaises(ValueError, P('').with_name, 'd.xml')
555 self.assertRaises(ValueError, P('.').with_name, 'd.xml')
556 self.assertRaises(ValueError, P('/').with_name, 'd.xml')
557 self.assertRaises(ValueError, P('a/b').with_name, '')
558 self.assertRaises(ValueError, P('a/b').with_name, '/c')
559 self.assertRaises(ValueError, P('a/b').with_name, 'c/')
560 self.assertRaises(ValueError, P('a/b').with_name, 'c/d')
1022 self.assertEqual(P('c:a/b').with_name('d.xml'), P('c:a/d.xml'))
1023 self.assertEqual(P('c:/a/b').with_name('d.xml'), P('c:/a/d.xml'))
1024 self.assertEqual(P('c:a/Dot ending.').with_name('d.xml'), P('c:a/d.xml'))
1025 self.assertEqual(P('c:/a/Dot ending.').with_name('d.xml'), P('c:/a/d.xml'))
1026 self.assertRaises(ValueError, P('c:').with_name, 'd.xml')
1027 self.assertRaises(ValueError, P('c:/').with_name, 'd.xml')
1028 self.assertRaises(ValueError, P('//My/Share').with_name, 'd.xml')
1029 self.assertRaises(ValueError, P('c:a/b').with_name, 'd:')
1030 self.assertRaises(ValueError, P('c:a/b').with_name, 'd:e')
1031 self.assertRaises(ValueError, P('c:a/b').with_name, 'd:/e')
1032 self.assertRaises(ValueError, P('c:a/b').with_name, '//My/Share')