Repository navigation
Treat empty Controllers and TestParams sections in the config as empty dicts - #1085
Closed
aad1tyaaaaa wants to merge 1 commit into
Closed
aad1tyaaaaa wants to merge 1 commit into
aad1tyaaaaa wants to merge 1 commit into
Conversation
Collaborator
|
Thanks for spotting and reporting this! While reviewing, we noticed a few closely related YAML Opened #1086 with a broader fix that handles all of these consistently with explicit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A testbed config with an empty
TestParams:orControllers:section, for example after commenting out every param, crashes the test class:With a test whose
setup_classcallsself.unpack_userparams(greeting="hi"):at
base_test.py:255, and the class is recorded as Error 1, Executed 0.YAML loads an empty section as
None, andoriginal_bed_config.get(key, {})inconfig_parser.pyreturns thatNoneinstead of the default. An emptyControllers:reaches the sameNoneincontroller_manager.py(module_config_name not in self.controller_configs).Both lookups are now
original_bed_config.get(key) or {}, so an empty section behaves like a missing one.test_load_test_config_file_with_empty_sectionscovers it; it fails without the fix, and the full suite passes with it.(Written with help from Claude Code.)