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