def test_set_traceback_limit(self):
    obj_size = 10
    tracemalloc.stop()
    self.assertRaises(ValueError, tracemalloc.start, (- 1))
    tracemalloc.stop()
    tracemalloc.start(10)
    (obj2, obj2_traceback) = allocate_bytes(obj_size)
    traceback = tracemalloc.get_object_traceback(obj2)
    self.assertEqual(len(traceback), 10)
    self.assertEqual(traceback, obj2_traceback)
    tracemalloc.stop()
    tracemalloc.start(1)
    (obj, obj_traceback) = allocate_bytes(obj_size)
    traceback = tracemalloc.get_object_traceback(obj)
    self.assertEqual(len(traceback), 1)
    self.assertEqual(traceback, obj_traceback)
def test_set_traceback_limit(self):
    obj_size = 10
    tracemalloc.stop()
    self.assertRaises(ValueError, tracemalloc.start, (- 1))
    tracemalloc.stop()
    tracemalloc.start(10)
    (obj2, obj2_traceback) = allocate_bytes(obj_size)
    traceback = tracemalloc.get_object_traceback(obj2)
    self.assertEqual(len(traceback), 10)
    self.assertEqual(traceback, obj2_traceback)
    tracemalloc.stop()
    tracemalloc.start(1)
    (obj, obj_traceback) = allocate_bytes(obj_size)
    traceback = tracemalloc.get_object_traceback(obj)
    self.assertEqual(len(traceback), 1)
    self.assertEqual(traceback, obj_traceback)