示例#1
0
def test_with_ancestor():
    handle = SolidHandle("baz", SolidHandle("bar", SolidHandle("foo", None)))
    assert handle.with_ancestor(None) == handle
    assert handle.with_ancestor(SolidHandle("quux", None)) == SolidHandle(
        "baz", SolidHandle("bar", SolidHandle("foo", SolidHandle("quux",
                                                                 None))))
示例#2
0
def test_with_ancestor():
    handle = SolidHandle('baz', SolidHandle('bar', SolidHandle('foo', None)))
    assert handle.with_ancestor(None) == handle
    assert handle.with_ancestor(SolidHandle('quux', None)) == SolidHandle(
        'baz', SolidHandle('bar', SolidHandle('foo', SolidHandle('quux',
                                                                 None))))