'Make sure child and parent traversals of specs work.'

def test_edge_traversals(self):

    d = Spec('d')
    spec = Spec('a', Spec('b', Spec('c', d), Spec('e')), Spec('f', Spec('g', d)))
    assert (['a', 'b', 'c', 'd', 'e', 'f', 'g'] == [s.name for s in spec.traverse(direction='children')])
    assert (['g', 'f', 'a'] == [s.name for s in spec['g'].traverse(direction='parents')])
    assert (['d', 'c', 'b', 'a', 'g', 'f'] == [s.name for s in spec['d'].traverse(direction='parents')])
