Example #1
0
def test_handle_path():
    handle = SolidHandle("baz", SolidHandle("bar", SolidHandle("foo", None)))
    assert handle.path == ["foo", "bar", "baz"]
    assert SolidHandle.from_path(handle.path) == handle

    handle = SolidHandle("foo", None)
    assert handle.path == ["foo"]
    assert SolidHandle.from_path(handle.path) == handle
Example #2
0
def test_handle_path():
    handle = SolidHandle('baz', SolidHandle('bar', SolidHandle('foo', None)))
    assert handle.path == ['foo', 'bar', 'baz']
    assert SolidHandle.from_path(handle.path) == handle

    handle = SolidHandle('foo', None)
    assert handle.path == ['foo']
    assert SolidHandle.from_path(handle.path) == handle