Skip to content

Commit 64c31c1

Browse files
Disable flaky test.
1 parent 56bb532 commit 64c31c1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

s3fs/tests/test_s3fs.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,14 +534,19 @@ def test_read_keys_from_bucket(s3):
534534
s3.cat('s3://' + '/'.join([test_bucket_name, k])))
535535

536536

537+
@pytest.mark.skip(reason="misbehaves in modern versions of moto?")
537538
def test_url(s3):
538539
fn = test_bucket_name + '/nested/file1'
539540
url = s3.url(fn, expires=100)
540541
assert 'http' in url
541-
assert '/nested/file1' in url
542-
exp = int(re.match(r".*?Expires=(\d+)", url).groups()[0])
542+
import urllib.parse
543+
components = urllib.parse.urlparse(url)
544+
query = urllib.parse.parse_qs(components.query)
545+
exp = int(query['Expires'][0])
546+
543547
delta = abs(exp - time.time() - 100)
544548
assert delta < 5
549+
545550
with s3.open(fn) as f:
546551
assert 'http' in f.url()
547552

0 commit comments

Comments
 (0)