Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvittal committed Jul 3, 2024
1 parent 7183b75 commit 0fd548a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions hail/python/test/hailtop/test_aiogoogle.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import concurrent.futures
import functools
import os
import random
import secrets
from concurrent.futures import ThreadPoolExecutor

Expand Down Expand Up @@ -164,3 +165,14 @@ async def test_weird_urls(gs_filesystem):

await fs.write(base + '???', b'contents of ???')
assert await fs.read(base + '???') == b'contents of ???'


async def test_rewrite(gs_filesystem):
_, fs, base = gs_filesystem

data = random.randbytes(1024 * 1024 * 20)
await fs.write(base + 'source', data)
assert await fs.read(base + 'source') == data

await fs.copy_within_gcs(base + 'source', base + 'dest')
assert await fs.read(base + 'dest') == data

0 comments on commit 0fd548a

Please sign in to comment.