tracemalloc: filter_traces() raises a TypeError if filters is not an iterable

This commit is contained in:
Victor Stinner 2014-03-10 11:05:07 +01:00
parent bcfcfc51f8
commit 8ce8ff9ac7
2 changed files with 6 additions and 1 deletions

View file

@ -346,6 +346,8 @@ class TestSnapshot(unittest.TestCase):
self.assertIsNot(snapshot5.traces, snapshot.traces)
self.assertEqual(snapshot5.traces, snapshot.traces)
self.assertRaises(TypeError, snapshot.filter_traces, filter1)
def test_snapshot_group_by_line(self):
snapshot, snapshot2 = create_snapshots()
tb_0 = traceback_lineno('<unknown>', 0)