Esempio n. 1
0
 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"))
Esempio n. 2
0
 def test_dynamic_file_expression_should_not_match_directory_part(self):
     self.assertFalse(GlobExpression("*spam.egg").matches("foo/spam.egg"))
Esempio n. 3
0
 def test_dynamic_file_expression_should_not_match_different_file_part(
         self):
     self.assertFalse(GlobExpression("spam.egg*").matches("foo.spam.egg"))
Esempio n. 4
0
 def test_dynamic_file_expression_should_match_no_character(self):
     self.assertTrue(GlobExpression("spam.egg*").matches("spam.egg"))
Esempio n. 5
0
 def test_static_expression_should_not_match_different_file_name(self):
     self.assertFalse(GlobExpression("spam.eggs").matches("spam.egg"))
Esempio n. 6
0
 def test_static_expression_should_match_exact_file_name(self):
     self.assertTrue(GlobExpression("spam.eggs").matches("spam.eggs"))