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/')
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)