File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -576,16 +576,20 @@ def test_xopen_zst_fails_when_zstandard_not_available(monkeypatch):
576
576
f .read ()
577
577
578
578
579
- @pytest .mark .parametrize ("threads" , (None , 0 , 1 ))
579
+ @pytest .mark .parametrize ("threads" , (0 , 1 ))
580
580
def test_xopen_zst_long_window_size (threads ):
581
581
if threads == 0 and zstandard is None :
582
582
return
583
583
elif threads == 1 and not shutil .which ("zstd" ):
584
584
return
585
+ # File created with:
586
+ # cat /dev/zero | head -c 2147483648 > only_zeroes
587
+ # Then compressed with
588
+ # zstd --long=31 -19 only_zeroes
585
589
test_zst = Path (__file__ ).parent / "only_zeroes.zst"
586
590
with xopen (test_zst , "rb" , threads = threads ) as f :
587
- data = f .read ()
588
- assert len ( data ) == 2 ** 31
591
+ data = f .read (1024 )
592
+ assert data == bytes ( 1024 )
589
593
590
594
591
595
@pytest .mark .parametrize ("threads" , (0 , 1 ))
You can’t perform that action at this time.
0 commit comments