Skip to content
Myr

Attempt to resolve test flakiness (#946)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tom Christie · committed by GitHub · parent 97d488a · Browse files · 2 files+1 added−13 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+1 added−13 removed

  • tests:+1 added−13 removed

2 files+1 added−13 removed

modified:tests/client/test_client.py-7 removed
144 unmodified lines
145 url = client.merge_url("http://www.paypal.com")146147 assert url.scheme == "https"148 assert url.is_ssl149150151def test_elapsed_delay(server):152 url = server.url.copy_with(path="/slow_response/100")153 with httpx.Client() as client:154 response = client.get(url)155 assert response.elapsed.total_seconds() > 0.0
modified:tests/conftest.py+1 added-6 removed
100 unmodified lines
101 await send({"type": "http.response.body", "body": b"Hello, world!"})102103104async def slow_response(scope, receive, send):105 delay_ms_str: str = scope["path"].replace("/slow_response/", "")106 try:107 delay_ms = float(delay_ms_str)108 except ValueError:109 delay_ms = 100110 await sleep(delay_ms / 1000.0)105 await sleep(1.0)106 await send(107 {108 "type": "http.response.start",109 "status": 200,
196 unmodified lines