Fixes Pylint E1120 (no-value-for-parameter
) violations and removes global ignore
#1194
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of #1181.
Removes
if __name__ == "__main__"
blocks fromtests/test_enhanced_lifestyle.py
andtests/test_rti.py
test modules which call out to test functions to allow running the modules as scripts. In both cases the call signatures of the test functions called have changed and so running as a script would have raised an error. As in both files this has been the case for a while, I suspect this means no-one is regularly using this approach for running tests, and in general usingpytest
should be preferred anyway, so I've just removed these blocks altogether rather than trying to fix. We probably also want to update the wiki to remove the example test module skeleton to remove the correspondingif __name__ == "__main__"
block.Also refactors
test_scale_run_script_deterministic
intests/test_determinism.py
to avoid a Pylint E1120 false positive on unpackingfinal_population_dataframes
list in to call topandas.testing.assert_frame_equal
which appears to be because it cannot determine the length of the list and so whether both the requiredleft
andright
arguments topandas.testing.assert_frame_equal
will be passed values. An error message was previously being constructed alongside the call topandas.testing.assert_frame_equal
but nothing was actually being done with it, presumably as I initially wrote this as a plainassert
statement intending the error message to be the optional message component of the statement, but then changed to using the pandas function instead at some point. The code has now been refactored to use a plainassert
withpandas.DataFrame.equals
which both avoids the false positive and ensures the error message will be correctly displayed.