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))))
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))))