Fix TypeError on YAML test execution with trace option#1299
Fix TypeError on YAML test execution with trace option#1299
Conversation
|
Rebasing to get #1297. This should fix current |
7076ff3 to
08c878a
Compare
|
Rebasing on top of #1297 didn't fix the issue: Fixed in last commits and the same fix also comes with open #1304. 🐛 The issue seems to have started with #1185: |
| node: t.TraceNode, | ||
| depth: int, | ||
| aggregate: bool, | ||
| max_depth: int = sys.maxsize, |
There was a problem hiding this comment.
Default value removed as
_get_node_logshouldn't be called outsideopenfisca_core(as its name starting with_suggests). So wouldn't a change of themax_depthoption value here produce unexpected behaviors for code calling the publicopenfisca_core?
| super().__init__("", TestFile(), TaxBenefitSystem(), test, {}) | ||
|
|
||
| self.tax_benefit_system = self.baseline_tax_benefit_system | ||
| self.simulation = Simulation() |
There was a problem hiding this comment.
Removed to call the default constructor.
Simulation()used once only intest_variable_not_found.
| clean_performance_files(paths) | ||
|
|
||
|
|
||
| def test_verbose_option_output(capsys) -> None: |
There was a problem hiding this comment.
The test used to debug the
TypeErrorfixed by this PR.
There was a problem hiding this comment.
Looks good but since there are many things I do not understand, I will let the last word to pros like @bonjourmauko or @guillett
|
@sandcha should we merge this PR ? |
3e33e43 to
7e0f75d
Compare
Connected to #1293 issue
Connected to openfisca/openfisca-france#2387 issue
And contains same fix as in #1304 issue (adds tests)
Bug fix
print_computation_log()for YAML tests withverboseoptionmax_depthand fixesTypeErroronopenfisca test -v file.yamlcommand introduced in openfisca-core41.5.6