예제 #1
0
파일: test_base.py 프로젝트: EricM2/venv
def test_api_readwrite_text(with_adapter: str, bucket: str) -> None:
    path = Pathy(f"gs://{bucket}/write_text/file.txt")
    path.write_text("---")
    with path.open() as file_obj:
        assert file_obj.read() == "---"
    assert path.read_text() == "---"
예제 #2
0
def test_api_open_for_read(with_adapter, bucket: str):
    path = Pathy(f"gs://{bucket}/read/file.txt")
    path.write_text("---")
    with path.open() as file_obj:
        assert file_obj.read() == "---"
    assert path.read_text() == "---"