Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

test: reduce test data size to 1MB

Adityaa94b30342a45
diff --git a/scrapy/core/http2/stream.py b/scrapy/core/http2/stream.py
index f45ddc04e..1c856ff68 100644
--- a/scrapy/core/http2/stream.py
+++ b/scrapy/core/http2/stream.py
@@ -243,7 +243,6 @@ class Stream:
bytes_to_send_size = min(window_size, self.remaining_content_length)
# We now need to send a number of data frames.
- data_frames_sent = 0
while bytes_to_send_size > 0:
chunk_size = min(bytes_to_send_size, max_frame_size)
@@ -252,7 +251,6 @@ class Stream:
self._conn.send_data(self.stream_id, data_chunk, end_stream=False)
- data_frames_sent += 1
bytes_to_send_size = bytes_to_send_size - chunk_size
self.remaining_content_length = self.remaining_content_length - chunk_size
diff --git a/tests/test_http2_client_protocol.py b/tests/test_http2_client_protocol.py
index ca8a629b1..98dc98a0f 100644
--- a/tests/test_http2_client_protocol.py
+++ b/tests/test_http2_client_protocol.py
@@ -42,8 +42,8 @@ def make_html_body(val):
class Data:
- SMALL_SIZE = 1024 * 10 # 10 KB
- LARGE_SIZE = (1024 ** 2) * 10 # 10 MB
+ SMALL_SIZE = 1024 # 1 KB
+ LARGE_SIZE = 1024 ** 2 # 1 MB
STR_SMALL = generate_random_string(SMALL_SIZE)
STR_LARGE = generate_random_string(LARGE_SIZE)