def test_filter_attributes(self):
    f = tracemalloc.Filter(True, 'abc')
    self.assertEqual(f.inclusive, True)
    self.assertEqual(f.filename_pattern, 'abc')
    self.assertIsNone(f.lineno)
    self.assertEqual(f.all_frames, False)
    f = tracemalloc.Filter(False, 'test.py', 123, True)
    self.assertEqual(f.inclusive, False)
    self.assertEqual(f.filename_pattern, 'test.py')
    self.assertEqual(f.lineno, 123)
    self.assertEqual(f.all_frames, True)
    f = tracemalloc.Filter(inclusive=False, filename_pattern='test.py', lineno=123, all_frames=True)
    self.assertEqual(f.inclusive, False)
    self.assertEqual(f.filename_pattern, 'test.py')
    self.assertEqual(f.lineno, 123)
    self.assertEqual(f.all_frames, True)
    self.assertRaises(AttributeError, setattr, f, 'filename_pattern', 'abc')
def test_filter_attributes(self):
    f = tracemalloc.Filter(True, 'abc')
    self.assertEqual(f.inclusive, True)
    self.assertEqual(f.filename_pattern, 'abc')
    self.assertIsNone(f.lineno)
    self.assertEqual(f.all_frames, False)
    f = tracemalloc.Filter(False, 'test.py', 123, True)
    self.assertEqual(f.inclusive, False)
    self.assertEqual(f.filename_pattern, 'test.py')
    self.assertEqual(f.lineno, 123)
    self.assertEqual(f.all_frames, True)
    f = tracemalloc.Filter(inclusive=False, filename_pattern='test.py', lineno=123, all_frames=True)
    self.assertEqual(f.inclusive, False)
    self.assertEqual(f.filename_pattern, 'test.py')
    self.assertEqual(f.lineno, 123)
    self.assertEqual(f.all_frames, True)
    self.assertRaises(AttributeError, setattr, f, 'filename_pattern', 'abc')