Closed ncilfone closed 2 years ago
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
spock/backend/field_handlers.py | 9 | 10 | 90.0% | ||
<!-- | Total: | 10 | 11 | 90.91% | --> |
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
spock/backend/field_handlers.py | 3 | 93.96% | ||
<!-- | Total: | 3 | --> |
Totals | |
---|---|
Change from base Build 1649888142: | 0.09% |
Covered Lines: | 1607 |
Relevant Lines: | 1688 |
@gbmarc1 Addresses defining repeated classes via coded defaults e.g.
nested_list_def: List[NestedListStuff] = [NestedListStuff, NestedListStuff(one=1, two="two"), NestedListStuff(one=3, two="four")]
This should work now. Need to catch some exceptions etc. to make it fail cleanly so it's still WIP.
What does this PR do?
Handles #196
will default to a list of length 1 initialized with NestedListStuff default attribute values
will default to a list of length 2, both initialized with NestedListStuff default attribute values.
This now allows for mixing defaults as well:
where the class instantiated at pos [0] is initialized with NestedListStuff default attribute values while the class instantiated at pos[1] will be the coded defaults.
Checklist