Пример #1
0
 def test_stars(self):
     left = Matcher('some/*/path/')
     right = Matcher('with/file')
     concatenated = left.concat(right)
     self.assertEqual(concatenated.prefix, 'some/')
     concatenated = right.concat(left)
     self.assertEqual(concatenated.prefix, 'with/filesome/')
Пример #2
0
 def test_stars(self):
     left = Matcher('some/*/path/')
     right = Matcher('with/file')
     concatenated = left.concat(right)
     self.assertEqual(concatenated.prefix, 'some/')
     concatenated = right.concat(left)
     self.assertEqual(concatenated.prefix, 'with/filesome/')
Пример #3
0
 def test_plain(self):
     left = Matcher('some/path/')
     right = Matcher('with/file')
     concatenated = left.concat(right)
     self.assertEqual(str(concatenated), 'some/path/with/file')
     self.assertEqual(concatenated.prefix, 'some/path/with/file')
     pattern_concatenated = left.concat('with/file')
     self.assertEqual(concatenated, pattern_concatenated)
Пример #4
0
 def test_plain(self):
     left = Matcher('some/path/')
     right = Matcher('with/file')
     concatenated = left.concat(right)
     self.assertEqual(str(concatenated), 'some/path/with/file')
     self.assertEqual(concatenated.prefix, 'some/path/with/file')
     pattern_concatenated = left.concat('with/file')
     self.assertEqual(concatenated, pattern_concatenated)