def test_api_resolve(with_adapter, bucket: str): path = Pathy(f"gs://{bucket}/fake-key") assert path.resolve() == path path = Pathy(f"gs://{bucket}/dir/../fake-key") assert path.resolve() == Pathy(f"gs://{bucket}/fake-key")
def test_base_not_supported(monkeypatch): monkeypatch.setattr(Pathy._flavour, "is_supported", False) with pytest.raises(NotImplementedError): Pathy()
def test_base_symlink_to(): path = Pathy("/fake-bucket/fake-key") with pytest.raises(NotImplementedError): path.symlink_to("file_name")
def test_api_is_path_instance(with_adapter): blob = Pathy("gs://fake/blob") assert isinstance(blob, Path)
def test_base_lstat(): path = Pathy("/fake-bucket/fake-key") with pytest.raises(NotImplementedError): path.lstat()