6
6
import functools
7
7
import gzip
8
8
import io
9
- import itertools
10
9
import lzma
11
10
import os
12
11
from pathlib import Path
@@ -512,9 +511,8 @@ def test_override_output_format_wrong_format(tmp_path):
512
511
OPENERS = (xopen , functools .partial (xopen , threads = 0 ))
513
512
514
513
515
- @pytest .mark .parametrize (
516
- ["opener" , "extension" ], itertools .product (OPENERS , extensions )
517
- )
514
+ @pytest .mark .parametrize ("opener" , OPENERS )
515
+ @pytest .mark .parametrize ("extension" , extensions )
518
516
def test_text_encoding_newline_passthrough (opener , extension , tmp_path ):
519
517
if extension == ".zst" and zstandard is None :
520
518
return
@@ -528,9 +526,8 @@ def test_text_encoding_newline_passthrough(opener, extension, tmp_path):
528
526
assert result == "Eén ree\r Twee reeën\r "
529
527
530
528
531
- @pytest .mark .parametrize (
532
- ["opener" , "extension" ], itertools .product (OPENERS , extensions )
533
- )
529
+ @pytest .mark .parametrize ("opener" , OPENERS )
530
+ @pytest .mark .parametrize ("extension" , extensions )
534
531
def test_text_encoding_errors (opener , extension , tmp_path ):
535
532
if extension == ".zst" and zstandard is None :
536
533
return
@@ -569,7 +566,8 @@ def test_xopen_zst_fails_when_zstandard_not_available(monkeypatch):
569
566
f .read ()
570
567
571
568
572
- @pytest .mark .parametrize (["threads" , "ext" ], itertools .product ((0 , 1 ), extensions ))
569
+ @pytest .mark .parametrize ("threads" , (0 , 1 ))
570
+ @pytest .mark .parametrize ("ext" , extensions )
573
571
def test_pass_file_object_for_reading (ext , threads ):
574
572
if ext == ".zst" and zstandard is None :
575
573
return
@@ -579,7 +577,8 @@ def test_pass_file_object_for_reading(ext, threads):
579
577
assert f .readline () == CONTENT_LINES [0 ].encode ("utf-8" )
580
578
581
579
582
- @pytest .mark .parametrize (["threads" , "ext" ], itertools .product ((0 , 1 ), extensions ))
580
+ @pytest .mark .parametrize ("threads" , (0 , 1 ))
581
+ @pytest .mark .parametrize ("ext" , extensions )
583
582
def test_pass_file_object_for_writing (tmp_path , ext , threads ):
584
583
if ext == ".zst" and zstandard is None :
585
584
return
@@ -591,7 +590,8 @@ def test_pass_file_object_for_writing(tmp_path, ext, threads):
591
590
assert fh .readline () == first_line
592
591
593
592
594
- @pytest .mark .parametrize (["threads" , "ext" ], itertools .product ((0 , 1 ), extensions ))
593
+ @pytest .mark .parametrize ("threads" , (0 , 1 ))
594
+ @pytest .mark .parametrize ("ext" , extensions )
595
595
def test_pass_bytesio_for_reading_and_writing (ext , threads ):
596
596
filelike = io .BytesIO ()
597
597
format = ext [1 :]
0 commit comments