@@ -447,7 +447,10 @@ def test_flamegraph_collector_basic(self):
447447
448448 # Test collecting sample data
449449 test_frames = [
450- (1 , [("file.py" , 10 , "func1" ), ("file.py" , 20 , "func2" )])
450+ MockInterpreterInfo (
451+ 0 ,
452+ [MockThreadInfo (1 , [("file.py" , 10 , "func1" ), ("file.py" , 20 , "func2" )])],
453+ )
451454 ]
452455 collector .collect (test_frames )
453456
@@ -473,14 +476,22 @@ def test_flamegraph_collector_export(self):
473476
474477 collector = FlamegraphCollector ()
475478
476- # Create some test data
479+ # Create some test data (use Interpreter/Thread objects like runtime)
477480 test_frames1 = [
478- (1 , [("file.py" , 10 , "func1" ), ("file.py" , 20 , "func2" )])
481+ MockInterpreterInfo (
482+ 0 ,
483+ [MockThreadInfo (1 , [("file.py" , 10 , "func1" ), ("file.py" , 20 , "func2" )])],
484+ )
479485 ]
480486 test_frames2 = [
481- (1 , [("file.py" , 10 , "func1" ), ("file.py" , 20 , "func2" )])
487+ MockInterpreterInfo (
488+ 0 ,
489+ [MockThreadInfo (1 , [("file.py" , 10 , "func1" ), ("file.py" , 20 , "func2" )])],
490+ )
482491 ] # Same stack
483- test_frames3 = [(1 , [("other.py" , 5 , "other_func" )])]
492+ test_frames3 = [
493+ MockInterpreterInfo (0 , [MockThreadInfo (1 , [("other.py" , 5 , "other_func" )])])
494+ ]
484495
485496 collector .collect (test_frames1 )
486497 collector .collect (test_frames2 )
0 commit comments