def test_filter_match_filename(self):

    def fnmatch(inclusive, filename, pattern):
        f = tracemalloc.Filter(inclusive, pattern)
        return f._match_frame(filename, 0)
    self.assertTrue(fnmatch(True, 'abc', 'abc'))
    self.assertFalse(fnmatch(True, '12356', 'abc'))
    self.assertFalse(fnmatch(True, '<unknown>', 'abc'))
    self.assertFalse(fnmatch(False, 'abc', 'abc'))
    self.assertTrue(fnmatch(False, '12356', 'abc'))
    self.assertTrue(fnmatch(False, '<unknown>', 'abc'))
def test_filter_match_filename(self):

    def fnmatch(inclusive, filename, pattern):
        f = tracemalloc.Filter(inclusive, pattern)
        return f._match_frame(filename, 0)
    self.assertTrue(fnmatch(True, 'abc', 'abc'))
    self.assertFalse(fnmatch(True, '12356', 'abc'))
    self.assertFalse(fnmatch(True, '<unknown>', 'abc'))
    self.assertFalse(fnmatch(False, 'abc', 'abc'))
    self.assertTrue(fnmatch(False, '12356', 'abc'))
    self.assertTrue(fnmatch(False, '<unknown>', 'abc'))