Example #1
0
 def test_question_mark(self):
     assert _wildcard_match_path('test.txt', 'test.tx?')
     assert not _wildcard_match_path('test.bmp', 'test.tx?')
Example #2
0
 def test_two_asterisks(self):
     assert _wildcard_match_path("directory/file.txt", "**.txt")
     assert not _wildcard_match_path("directory/file.bmp", "**.txt")
Example #3
0
 def test_exact_match(self):
     assert _wildcard_match_path('text.txt', 'text.txt')
     assert not _wildcard_match_path('text.txt', 'toast.bmp')
Example #4
0
 def test_asterisk(self):
     assert _wildcard_match_path("test.txt", "test*")
     assert not _wildcard_match_path("toast.txt", "test*")
Example #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")
Example #6
0
 def test_question_mark(self):
     assert _wildcard_match_path("test.txt", "test.tx?")
     assert not _wildcard_match_path("test.bmp", "test.tx?")
Example #7
0
 def test_exact_match(self):
     assert _wildcard_match_path("text.txt", "text.txt")
     assert not _wildcard_match_path("text.txt", "toast.bmp")
Example #8
0
 def test_two_asterisks(self):
     assert _wildcard_match_path('directory/file.txt', '**.txt')
     assert not _wildcard_match_path('directory/file.bmp', '**.txt')
Example #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')
Example #10
0
 def test_asterisk(self):
     assert _wildcard_match_path('test.txt', 'test*')
     assert not _wildcard_match_path('toast.txt', 'test*')