def test_dynamic_directory_expression_should_match_file_in_directory(self): self.assertTrue(GlobExpression("**/spam.egg").matches("foo/spam.egg")) self.assertTrue(GlobExpression("**/spam.egg").matches("bar/spam.egg"))
def test_dynamic_file_expression_should_not_match_directory_part(self): self.assertFalse(GlobExpression("*spam.egg").matches("foo/spam.egg"))
def test_dynamic_file_expression_should_not_match_different_file_part( self): self.assertFalse(GlobExpression("spam.egg*").matches("foo.spam.egg"))
def test_dynamic_file_expression_should_match_no_character(self): self.assertTrue(GlobExpression("spam.egg*").matches("spam.egg"))
def test_static_expression_should_not_match_different_file_name(self): self.assertFalse(GlobExpression("spam.eggs").matches("spam.egg"))
def test_static_expression_should_match_exact_file_name(self): self.assertTrue(GlobExpression("spam.eggs").matches("spam.eggs"))