@@ -59,13 +59,13 @@ def test_call_list_nested(self):
5959 assert (call_list_data == dictionary )
6060
6161 def test_call_list_super_nested (self ):
62- dictionary = {'functions' : {
63- 'func_d' : { 'local' : [ 'super_nested_call.func_d.func_e' ], 'nested' : {'func_e' : {'local' : ['print' ]}}},
64- 'main' : {'local' : ['super_nested_call.MyClass.func_a' ,
65- 'super_nested_call.func_d' ]}}, ' body' : {'local' : ['super_nested_call.main' ]}, 'classes' : { 'MyClass' : {
66- ' func_a' : {'local' : ['print' , 'super_nested_call.MyClass.func_a.func_b' ], 'nested' : {
67- ' func_b' : {'local' : ['print' , 'super_nested_call.MyClass.func_a.func_b.func_c' ],
68- 'nested' : {'func_c' : {'local' : ['print' ]}}}}}}}}
62+ dictionary = {'functions' : {'func_d' : { 'local' : [ 'super_nested_call.func_d.func_e' ],
63+ 'nested' : {'func_e' : {'local' : ['print' ]}}},
64+ 'main' : {'local' : ['super_nested_call.MyClass.func_a' , 'super_nested_call.func_d' ]}} ,
65+ ' body' : {'local' : ['super_nested_call.main' ]},
66+ 'classes' : { 'MyClass' : { ' func_a' : {'local' : ['print' , 'super_nested_call.MyClass.func_a.func_b' ],
67+ 'nested' : { ' func_b' : {'local' : ['print' , 'super_nested_call.MyClass.func_a.func_b.func_c' ],
68+ 'nested' : {'func_c' : {'local' : ['print' ]}}}}}}}}
6969 input_path = "./test_files/test_inheritance/super_nested_call.py"
7070 output_dir = "./output_dir"
7171 control_flow = False
@@ -74,14 +74,13 @@ def test_call_list_super_nested(self):
7474 source_code = False
7575 cf_dir , json_dir = create_output_dirs (output_dir , control_flow )
7676 code_info = CodeInspection (input_path , cf_dir , json_dir , fig , control_flow , abstract_syntax_tree , source_code )
77-
7877 call_list_data = call_list_file (code_info )
7978 shutil .rmtree (output_dir )
8079 assert (call_list_data == dictionary )
8180
8281 def test_call_list_import (self ):
8382 dictionary = {'functions' : {'funct_D' : {'local' : ['print' , 'test_functions.funct_A' ]}}, 'body' : {
84- 'local' : ['test_functions.funct_A' , 'test_import.funct_D' , 'test_import.funct_D' ]},
83+ 'local' : ['test_functions.funct_A' , 'test_import.funct_D' ]},
8584 'classes' : {'MyClass_D' : {'__init__' : {'local' : ['print' , 'test_functions.funct_C' , 'test_import.funct_D' ]}},
8685 'MyClass_E' : {'__init__' : {'local' : ['print' ]}}}}
8786 input_path = "./test_files/test_inheritance/test_import.py"
@@ -98,8 +97,7 @@ def test_call_list_import(self):
9897
9998 def test_call_list_external_module (self ):
10099 dictionary = {'body' : {
101- 'local' : ['random.seed' , 'print' , 'random.random' , 'random.random' , 'random.random' , 'random.seed' , 'print' ,
102- 'random.random' , 'random.random' , 'random.random' ]}}
100+ 'local' : ['random.seed' , 'print' , 'random.random' ]}}
103101 input_path = "./test_files/test_random.py"
104102 output_dir = "./output_dir"
105103 control_flow = False
@@ -238,8 +236,6 @@ def test_call_list_dynamic_import_method_variable(self):
238236 code_info = CodeInspection (input_path , cf_dir , json_dir , fig , control_flow , abstract_syntax_tree , source_code )
239237 call_list_data = call_list_file (code_info )
240238 shutil .rmtree (output_dir )
241- print (call_list_data )
242- print (dictionary )
243239 assert (call_list_data == dictionary )
244240
245241 def test_call_list_dynamic_class_import (self ):
0 commit comments