@@ -67,7 +67,7 @@ def divide(self, a, b):
67
67
68
68
def test_get_methods ():
69
69
"""Should return all of the methods"""
70
- python_analysis = PythonAnalysis (eager_analysis = True , project_dir = None , source_code = PYTHON_CODE , analysis_backend_path = None , analysis_json_path = None )
70
+ python_analysis = PythonAnalysis (project_dir = None , source_code = PYTHON_CODE )
71
71
72
72
all_methods = python_analysis .get_methods ()
73
73
assert all_methods is not None
@@ -79,7 +79,7 @@ def test_get_methods():
79
79
80
80
def test_get_functions ():
81
81
"""Should return all of the functions"""
82
- python_analysis = PythonAnalysis (eager_analysis = True , project_dir = None , source_code = PYTHON_CODE , analysis_backend_path = None , analysis_json_path = None )
82
+ python_analysis = PythonAnalysis (project_dir = None , source_code = PYTHON_CODE )
83
83
84
84
all_functions = python_analysis .get_functions ()
85
85
assert all_functions is not None
@@ -91,7 +91,7 @@ def test_get_functions():
91
91
92
92
def test_get_all_modules (tmp_path ):
93
93
"""Should return all of the modules"""
94
- python_analysis = PythonAnalysis (eager_analysis = True , project_dir = tmp_path , source_code = None , analysis_backend_path = None , analysis_json_path = None )
94
+ python_analysis = PythonAnalysis (project_dir = tmp_path , source_code = None )
95
95
96
96
# set up some temporary modules
97
97
temp_file_path = os .path .join (tmp_path , "hello.py" )
@@ -111,7 +111,7 @@ def test_get_all_modules(tmp_path):
111
111
112
112
def test_get_method_details ():
113
113
"""Should return the method details"""
114
- python_analysis = PythonAnalysis (eager_analysis = True , project_dir = None , source_code = PYTHON_CODE , analysis_backend_path = None , analysis_json_path = None )
114
+ python_analysis = PythonAnalysis (project_dir = None , source_code = PYTHON_CODE )
115
115
116
116
method_details = python_analysis .get_method_details ("add(self, a, b)" )
117
117
assert method_details is not None
@@ -121,7 +121,7 @@ def test_get_method_details():
121
121
122
122
def test_is_parsable ():
123
123
"""Should be able to parse the code"""
124
- python_analysis = PythonAnalysis (eager_analysis = True , project_dir = None , source_code = PYTHON_CODE , analysis_backend_path = None , analysis_json_path = None )
124
+ python_analysis = PythonAnalysis (project_dir = None , source_code = PYTHON_CODE )
125
125
126
126
code = "def is_parsable(self, code: str) -> bool: return True"
127
127
is_parsable = python_analysis .is_parsable (code )
@@ -134,7 +134,7 @@ def test_is_parsable():
134
134
135
135
def test_get_raw_ast ():
136
136
"""Should return the raw AST"""
137
- python_analysis = PythonAnalysis (eager_analysis = True , project_dir = None , source_code = PYTHON_CODE , analysis_backend_path = None , analysis_json_path = None )
137
+ python_analysis = PythonAnalysis (project_dir = None , source_code = PYTHON_CODE )
138
138
139
139
raw_ast = python_analysis .get_raw_ast (PYTHON_CODE )
140
140
assert raw_ast is not None
@@ -144,7 +144,7 @@ def test_get_raw_ast():
144
144
145
145
def test_get_imports ():
146
146
"""Should return all of the imports"""
147
- python_analysis = PythonAnalysis (eager_analysis = True , project_dir = None , source_code = PYTHON_CODE , analysis_backend_path = None , analysis_json_path = None )
147
+ python_analysis = PythonAnalysis (project_dir = None , source_code = PYTHON_CODE )
148
148
149
149
all_imports = python_analysis .get_imports ()
150
150
assert all_imports is not None
@@ -156,7 +156,7 @@ def test_get_imports():
156
156
157
157
def test_get_variables ():
158
158
"""Should return all of the variables"""
159
- python_analysis = PythonAnalysis (eager_analysis = True , project_dir = None , source_code = PYTHON_CODE , analysis_backend_path = None , analysis_json_path = None )
159
+ python_analysis = PythonAnalysis (project_dir = None , source_code = PYTHON_CODE )
160
160
161
161
with pytest .raises (NotImplementedError ) as except_info :
162
162
python_analysis .get_variables ()
@@ -165,7 +165,7 @@ def test_get_variables():
165
165
166
166
def test_get_classes ():
167
167
"""Should return all of the classes"""
168
- python_analysis = PythonAnalysis (eager_analysis = True , project_dir = None , source_code = PYTHON_CODE , analysis_backend_path = None , analysis_json_path = None )
168
+ python_analysis = PythonAnalysis (project_dir = None , source_code = PYTHON_CODE )
169
169
170
170
all_classes = python_analysis .get_classes ()
171
171
assert all_classes is not None
@@ -178,7 +178,7 @@ def test_get_classes():
178
178
179
179
def test_get_classes_by_criteria ():
180
180
"""Should return all of the classes that match the criteria"""
181
- python_analysis = PythonAnalysis (eager_analysis = True , project_dir = None , source_code = PYTHON_CODE , analysis_backend_path = None , analysis_json_path = None )
181
+ python_analysis = PythonAnalysis (project_dir = None , source_code = PYTHON_CODE )
182
182
183
183
with pytest .raises (NotImplementedError ) as except_info :
184
184
python_analysis .get_classes_by_criteria ()
@@ -187,7 +187,7 @@ def test_get_classes_by_criteria():
187
187
188
188
def test_get_sub_classes ():
189
189
"""Should return all of the subclasses"""
190
- python_analysis = PythonAnalysis (eager_analysis = True , project_dir = None , source_code = PYTHON_CODE , analysis_backend_path = None , analysis_json_path = None )
190
+ python_analysis = PythonAnalysis (project_dir = None , source_code = PYTHON_CODE )
191
191
192
192
with pytest .raises (NotImplementedError ) as except_info :
193
193
python_analysis .get_sub_classes ()
@@ -196,7 +196,7 @@ def test_get_sub_classe
10000
s():
196
196
197
197
def test_get_nested_classes ():
198
198
"""Should return all of the nested classes"""
199
- python_analysis = PythonAnalysis (eager_analysis = True , project_dir = None , source_code = PYTHON_CODE , analysis_backend_path = None , analysis_json_path = None )
199
+ python_analysis = PythonAnalysis (project_dir = None , source_code = PYTHON_CODE )
200
200
201
201
with pytest .raises (NotImplementedError ) as except_info :
202
202
python_analysis .get_nested_classes ()
@@ -205,7 +205,7 @@ def test_get_nested_classes():
205
205
206
206
def test_get_constructors ():
207
207
"""Should return all of the constructors"""
208
- python_analysis = PythonAnalysis (eager_analysis = True , project_dir = None , source_code = PYTHON_CODE , analysis_backend_path = None , analysis_json_path = None )
208
+ python_analysis = PythonAnalysis (project_dir = None , source_code = PYTHON_CODE )
209
209
210
210
with pytest .raises (NotImplementedError ) as except_info :
211
211
python_analysis .get_constructors ()
@@ -214,7 +214,7 @@ def test_get_constructors():
214
214
215
215
def test_get_methods_in_class ():
216
216
"""Should return all of the methods in the class"""
217
- python_analysis = PythonAnalysis (eager_analysis = True , project_dir = None , source_code = PYTHON_CODE , analysis_backend_path = None , analysis_json_path = None )
217
+ python_analysis = PythonAnalysis (project_dir = None , source_code = PYTHON_CODE )
218
218
219
219
with pytest .raises (NotImplementedError ) as except_info :
220
220
python_analysis .get_methods_in_class ()
@@ -223,7 +223,7 @@ def test_get_methods_in_class():
223
223
224
224
def test_get_fields ():
225
225
"""Should return all of the fields in the class"""
226
- python_analysis = PythonAnalysis (eager_analysis = True , project_dir = None , source_code = PYTHON_CODE , analysis_backend_path = None , analysis_json_path = None )
226
+ python_analysis = PythonAnalysis (project_dir = None , source_code = PYTHON_CODE )
227
227
228
228
with pytest .raises (NotImplementedError ) as except_info :
229
229
python_analysis .get_fields ()
0 commit comments