Skip to content

Commit

Permalink
Change tests target, bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
perklet committed Nov 23, 2023
1 parent c392c19 commit 68084d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "curl_cffi"
version = "0.5.10b4"
version = "0.5.10b5"
authors = [{ name = "Yifei Kong", email = "[email protected]" }]
description = "libcurl ffi bindings for Python, with impersonation support"
license = { file = "LICENSE" }
Expand Down
10 changes: 5 additions & 5 deletions tests/unittest/test_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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):
Expand Down

0 comments on commit 68084d3

Please sign in to comment.