"""Test cases for the fnmatch module."""
from test
import test_support
from fnmatch
import fnmatch
, fnmatchcase
class FnmatchTestCase(unittest
.TestCase
):
def check_match(self
, filename
, pattern
, should_match
=1):
self
.assert_(fnmatch(filename
, pattern
),
"expected %r to match pattern %r"
self
.assert_(not fnmatch(filename
, pattern
),
"expected %r not to match pattern %r"
check('abc', 'ab[de]', 0)
# these test that '\' is handled correctly in character sets;
test_support
.run_unittest(FnmatchTestCase
)
if __name__
== "__main__":