@@ -24,7 +24,7 @@ def test_call_list_super(self):
2424
2525 def test_call_list_super_test_5 (self ):
2626 dictionary = {'functions' : {}, 'body' : {
27- 'local' : ['super_test_5.Cube' , 'super_test_5.Cube .surface_area' , 'super_test_5.VolumeMixin.volume' ]},
27+ 'local' : ['super_test_5.Cube.surface_area' , 'super_test_5.VolumeMixin.volume' ]},
2828 'Rectangle' : {}, 'Square' : {'__init__' : {'local' : ['super_test_5.Rectangle.__init__' ]}},
2929 'VolumeMixin' : {'volume' : {'local' : ['super_test_5.VolumeMixin.area' ]}},
3030 'Cube' : {'__init__' : {'local' : ['super_test_5.Square.__init__' ]},
@@ -43,9 +43,9 @@ def test_call_list_super_test_5(self):
4343 assert (call_list_data ['body' ] == dictionary ['body' ])
4444
4545 def test_call_list_nested (self ):
46- dictionary = {'functions' : {'test' : {'local' : ['nested_call.MyClass' , 'nested_call.MyClass. func' ]}},
46+ dictionary = {'functions' : {'test' : {'local' : ['nested_call.MyClass. func' ]}},
4747 'body' : {'local' : ['nested_call.test' ]}, 'classes' : {'MyClass' : {
48- 'func' : {'local' : ['nested_call.MyClass.func.nested' ], 'nested' : {'nested' : {'local' : ['print' ]}}}}}}
48+ 'func' : {'local' : ['nested_call.MyClass.func.nested' ], 'nested' : {'nested' : {'local' : ['print' ]}}}}}}
4949 input_path = "./test_files/test_inheritance/nested_call.py"
5050 output_dir = "./output_dir"
5151 control_flow = False
@@ -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' , '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
@@ -80,11 +80,9 @@ def test_call_list_super_nested(self):
8080
8181 def test_call_list_import (self ):
8282 dictionary = {'functions' : {'funct_D' : {'local' : ['print' , 'test_functions.funct_A' ]}}, 'body' : {
83- 'local' : ['test_classes.MyClass_A' , 'test_classes.MyClass_B' , 'test_import.MyClass_D' ,
84- 'test_functions.funct_A' , 'test_import.funct_D' , 'test_classes.MyClass_C' ,
85- 'test_import.funct_D' ]}, 'classes' : {'MyClass_D' : {
86- '__init__' : {'local' : ['print' , 'test_functions.funct_C' , 'test_import.funct_D' , 'test_import.MyClass_E' ]}},
87- 'MyClass_E' : {'__init__' : {'local' : ['print' , 'test_classes.MyClass_B' ]}}}}
83+ 'local' : ['test_functions.funct_A' , 'test_import.funct_D' ]},
84+ 'classes' : {'MyClass_D' : {'__init__' : {'local' : ['print' , 'test_functions.funct_C' , 'test_import.funct_D' ]}},
85+ 'MyClass_E' : {'__init__' : {'local' : ['print' ]}}}}
8886 input_path = "./test_files/test_inheritance/test_import.py"
8987 output_dir = "./output_dir"
9088 control_flow = False
@@ -99,8 +97,7 @@ def test_call_list_import(self):
9997
10098 def test_call_list_external_module (self ):
10199 dictionary = {'body' : {
102- 'local' : ['random.seed' , 'print' , 'random.random' , 'random.random' , 'random.random' , 'random.seed' , 'print' ,
103- 'random.random' , 'random.random' , 'random.random' ]}}
100+ 'local' : ['random.seed' , 'print' , 'random.random' ]}}
104101 input_path = "./test_files/test_random.py"
105102 output_dir = "./output_dir"
106103 control_flow = False
@@ -115,7 +112,7 @@ def test_call_list_external_module(self):
115112
116113 def test_call_list_argument_call (self ):
117114 dictionary = {'functions' : {'func_1' : {'local' : ['print' , 'argument_call.func_2' ]}},
118- 'body' : {'local' : ['print' , 'argument_call.func_1' , 'argument_call.MyClass.func_a' , 'argument_call.MyClass' ]},
115+ 'body' : {'local' : ['print' , 'argument_call.func_1' , 'argument_call.MyClass.func_a' ]},
119116 'classes' : {'MyClass' : {'func_a' : {'local' : ['print' , 'argument_call.MyClass.func_b' ]}}}}
120117 input_path = "./test_files/test_dynamic/argument_call.py"
121118 output_dir = "./output_dir"
@@ -209,7 +206,7 @@ def test_call_list_dynamic_import_alias(self):
209206
210207 def test_call_list_dynamic_import_method (self ):
211208 dictionary = {'functions' : {'func_2' : {'local' : ['test_dynamic_method.MyClass.func_1' ]}, 'main' : {
212- 'local' : ['test_dynamic_method.func_2' , 'print' , 'test_dynamic_method.MyClass' ]}}, 'body' : {'local' : ['test_dynamic_method.main' ]},
209+ 'local' : ['test_dynamic_method.func_2' , 'print' ]}}, 'body' : {'local' : ['test_dynamic_method.main' ]},
213210 'classes' : {'MyClass' : {}}}
214211 input_path = "./test_files/test_dynamic/test_dynamic_method.py"
215212 output_dir = "./output_dir"
@@ -224,9 +221,11 @@ def test_call_list_dynamic_import_method(self):
224221 assert (call_list_data == dictionary )
225222
226223 def test_call_list_dynamic_import_method_variable (self ):
227- dictionary = {'functions' : {'func_2' : {'local' : ['test_dynamic_method_variable.MyClass.func_1' ]}, 'main' : {
228- 'local' : ['test_dynamic_method_variable.MyClass' , 'test_dynamic_method_variable.func_2' , 'print' ]}},
229- 'body' : {'local' : ['test_dynamic_method_variable.main' ]}, 'classes' : {'MyClass' : {}}}
224+ dictionary = {'functions' : {'func_2' : {'local' : ['test_dynamic_method_variable.MyClass.func_1' ]},
225+ 'main' : {'local' : ['test_dynamic_method_variable.func_2' , 'print' ]}},
226+ 'body' : {'local' : ['test_dynamic_method_variable.main' ]}, 'classes' : {'MyClass' : {}}}
227+
228+
230229 input_path = "./test_files/test_dynamic/test_dynamic_method_variable.py"
231230 output_dir = "./output_dir"
232231 control_flow = False
@@ -241,7 +240,7 @@ def test_call_list_dynamic_import_method_variable(self):
241240
242241 def test_call_list_dynamic_class_import (self ):
243242 dictionary = {'functions' : {}, 'body' : {
244- 'local' : ['test_dynamic_class_import.MyClass' , 'test_dynamic_class_import.MyClass .func_3' ]},
243+ 'local' : ['test_dynamic_class_import.MyClass.func_3' ]},
245244 'classes' : {'MyClass' : {'func_3' : {'local' : ['test_dynamic_func.func_1' ]}}}}
246245 input_path = "./test_files/test_dynamic/test_dynamic_class_import.py"
247246 output_dir = "./output_dir"
@@ -627,7 +626,6 @@ def test_metadata(self):
627626 print (f"Error sending requests to Github API: { e } " )
628627 raise e
629628 actual_metadata = dir_info ["metadata" ]
630- print ("ROSA ACTUAL_METADATA:%s, EXPECTED_METADATA %s" % (dir_info , expected_metadata ))
631629 assert expected_metadata == actual_metadata
632630
633631
@@ -706,7 +704,6 @@ def invoke_inspector(input_path, fig, output_dir, ignore_dir_pattern, ignore_fil
706704 if readme :
707705 dir_info ["readme_files" ] = extract_readme (input_path )
708706 if metadata :
709- print ("ENTRO!!" )
710707 dir_info ["metadata" ] = get_github_metadata (input_path )
711708 return dir_info
712709
0 commit comments