File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 88
99import pytest
1010
11+ from pylibsshext .sftp import SFTP_MAX_CHUNK
12+
1113
1214@pytest .fixture
1315def sftp_session (ssh_client_session ):
@@ -21,16 +23,17 @@ def sftp_session(ssh_client_session):
2123
2224
2325@pytest .fixture (
24- params = (32 , 1024 + 1 ),
26+ params = (32 , SFTP_MAX_CHUNK + 1 ),
2527 ids = ('small-payload' , 'large-payload' ),
2628)
2729def transmit_payload (request : pytest .FixtureRequest ) -> bytes :
2830 """Generate binary test payloads of assorted sizes.
2931
3032 The choice 32 is arbitrary small value.
3133
32- The choice 1024 + 1 is meant to be 1B larger than the chunk size used in
33- :file:`sftp.pyx` to make sure we excercise at least two rounds of reading/writing.
34+ The choice SFTP_MAX_CHUNK + 1 (32kB + 1B) is meant to be 1B larger than the chunk
35+ size used in :file:`sftp.pyx` to make sure we excercise at least two rounds of
36+ reading/writing.
3437 """
3538 payload_len = request .param
3639 random_bytes = [ord (random .choice (string .printable )) for _ in range (payload_len )]
You can’t perform that action at this time.
0 commit comments