Exemple #1
0
 def test_question_mark(self):
     assert _wildcard_match_path('test.txt', 'test.tx?')
     assert not _wildcard_match_path('test.bmp', 'test.tx?')
Exemple #2
0
 def test_two_asterisks(self):
     assert _wildcard_match_path("directory/file.txt", "**.txt")
     assert not _wildcard_match_path("directory/file.bmp", "**.txt")
Exemple #3
0
 def test_exact_match(self):
     assert _wildcard_match_path('text.txt', 'text.txt')
     assert not _wildcard_match_path('text.txt', 'toast.bmp')
Exemple #4
0
 def test_asterisk(self):
     assert _wildcard_match_path("test.txt", "test*")
     assert not _wildcard_match_path("toast.txt", "test*")
Exemple #5
0
 def test_asterisk_without_slash(self):
     assert _wildcard_match_path("directory/file.txt", "directory/*.txt")
     assert not _wildcard_match_path("directory/file.txt", "*.txt")
Exemple #6
0
 def test_question_mark(self):
     assert _wildcard_match_path("test.txt", "test.tx?")
     assert not _wildcard_match_path("test.bmp", "test.tx?")
Exemple #7
0
 def test_exact_match(self):
     assert _wildcard_match_path("text.txt", "text.txt")
     assert not _wildcard_match_path("text.txt", "toast.bmp")
Exemple #8
0
 def test_two_asterisks(self):
     assert _wildcard_match_path('directory/file.txt', '**.txt')
     assert not _wildcard_match_path('directory/file.bmp', '**.txt')
Exemple #9
0
 def test_asterisk_without_slash(self):
     assert _wildcard_match_path('directory/file.txt', 'directory/*.txt')
     assert not _wildcard_match_path('directory/file.txt', '*.txt')
Exemple #10
0
 def test_asterisk(self):
     assert _wildcard_match_path('test.txt', 'test*')
     assert not _wildcard_match_path('toast.txt', 'test*')