BitBloomTech / spawn

Allows users to concisely specify and execute a large number of tasks with complex and co-dependent input parameter variations
GNU General Public License v3.0
2 stars 1 forks source link

Error with multiple indexed properties #71

Closed phil-brad closed 5 years ago

phil-brad commented 5 years ago

The following fails (although it does work when you don't use the macro):

def test_can_have_multiple_indexed_properties_with_one_being_a_macro(plugin_loader):
    provider = DictSpecificationProvider({
        'macros': {
            'Value': 4.0
        },
        'spec': {
            'blah': {
                'alpha[1]': '$Value',
                'beta[1]': 6
            }
        }
    })
    parser = SpecificationParser(provider, plugin_loader)
    root_node = parser.parse().root_node
    assert isinstance(root_node.leaves[0], IndexedNode)

Symptoms:

>       new_node = type(node)(parent, node.property_name, node.property_value, node._path_part, node._ghosts)
E       TypeError: __init__() missing 1 required positional argument: 'ghosts'