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