fix failing test_optparse.TestValuesDictionary test #704
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.
In test_optparse.TestValueDictionary.test_values_contains_positional_arguments_default_value,
op.parse()
is called to see if a positional argument would be filled with its default value when no arguments are given. However,op.parse()
is called with no arguments instead of an empty list, which actually passes it arguments passed to the godot process.Because of this, running the test with
godot -d -s addons/gut/gut_cmdln.gd -gtest test/unit/test_optparse.gd
(with no .gutconfig.json file) fails with[Failed]: ["test/unit/test_optparse.gd"] expected to equal ["asdf"]:
.By passing it an empty list we ensure it tries to parse no arguments, and the test no longer fails when run with the above command.