def test_zero_nodes(self):

    def check_zero_nodes(spec):
        parsed = ParsedSpec(spec)
        self.assertEqual(parsed.size(), 0)
        self.assertEqual(spec, parsed.instantiate([]))
    check_zero_nodes(1)
    check_zero_nodes([])
    check_zero_nodes([1, 2, 3])
    check_zero_nodes((1, 2, 3))
    check_zero_nodes({})
    check_zero_nodes({'a': 0, 'b': 1})
    check_zero_nodes({'a': [1, 2], 'b': {'key': (1, 2)}})
def test_zero_nodes(self):

    def check_zero_nodes(spec):
        parsed = ParsedSpec(spec)
        self.assertEqual(parsed.size(), 0)
        self.assertEqual(spec, parsed.instantiate([]))
    check_zero_nodes(1)
    check_zero_nodes([])
    check_zero_nodes([1, 2, 3])
    check_zero_nodes((1, 2, 3))
    check_zero_nodes({})
    check_zero_nodes({'a': 0, 'b': 1})
    check_zero_nodes({'a': [1, 2], 'b': {'key': (1, 2)}})