new API
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 2s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 2s
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
from unittest import TestCase
|
||||
|
||||
from kpmatch import specificity
|
||||
from kpmatch import compile
|
||||
|
||||
|
||||
def specificity(pattern: str) -> int:
|
||||
return compile(pattern)[0].specificity
|
||||
|
||||
|
||||
class SpecificityTests(TestCase):
|
||||
@@ -10,7 +14,6 @@ class SpecificityTests(TestCase):
|
||||
self.assertGreater(specificity("**/a/file.txt"), specificity("**/a/*.txt"))
|
||||
self.assertGreater(specificity("file.txt"), specificity("*.txt"))
|
||||
self.assertGreater(specificity("*.txt"), specificity("*"))
|
||||
self.assertGreater(specificity("file.{txt,html}"), specificity("*.txt"))
|
||||
self.assertGreater(specificity("image_???.png"), specificity("image_*.png"))
|
||||
self.assertGreater(specificity("image.png"), specificity("image_???.png"))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user