From 68084d38af71a70e2fdecc9abe1a3c1a49acb374 Mon Sep 17 00:00:00 2001 From: Yifei Kong Date: Thu, 23 Nov 2023 16:01:47 +0800 Subject: [PATCH] Change tests target, bump version --- pyproject.toml | 2 +- tests/unittest/test_requests.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 331e1308..f5d7f402 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "curl_cffi" -version = "0.5.10b4" +version = "0.5.10b5" authors = [{ name = "Yifei Kong", email = "kong@yifei.me" }] description = "libcurl ffi bindings for Python, with impersonation support" license = { file = "LICENSE" } diff --git a/tests/unittest/test_requests.py b/tests/unittest/test_requests.py index 85791155..d82bf9a9 100644 --- a/tests/unittest/test_requests.py +++ b/tests/unittest/test_requests.py @@ -574,7 +574,7 @@ def test_stream_close_early(server): s = requests.Session() # url = str(server.url.copy_with(path="/large")) # from http://xcal1.vodafone.co.uk/ - url = "http://212.183.159.230/10MB.zip" + url = "http://212.183.159.230/200MB.zip" r = s.get(url, max_recv_speed=1024 * 1024, stream=True) counter = 0 start = time.time() @@ -584,19 +584,19 @@ def test_stream_close_early(server): break r.close() end = time.time() - assert end - start < 10 + assert end - start < 50 def test_max_recv_speed(server): s = requests.Session() url = str(server.url.copy_with(path="/large")) # from http://xcal1.vodafone.co.uk/ - url = "http://212.183.159.230/10MB.zip" + url = "http://212.183.159.230/200MB.zip" start = time.time() - r = s.get(url, max_recv_speed=1024 * 1024) + r = s.get(url, max_recv_speed=5 * 1024 * 1024) end = time.time() # assert len(r.content) == 20 * 1024 * 1024 - assert end - start > 10 + assert end - start > 30 def test_curl_infos(server):