@@ -51,6 +51,19 @@ def test_empty_file(tmp_path):
51
51
assert result ["summary" ]["total_bases" ] == 0
52
52
53
53
54
+ def test_empty_file_paired (tmp_path ):
55
+ empty_fastq = TEST_DATA / "empty.fastq"
56
+ sys .argv = ["" , "--dir" , str (tmp_path ), str (empty_fastq ), str (empty_fastq )]
57
+ main ()
58
+ simple_fastq_json = tmp_path / "empty.fastq.json"
59
+ assert simple_fastq_json .exists ()
60
+ result = json .loads (simple_fastq_json .read_text ())
61
+ assert result ["summary_read2" ]["maximum_length" ] == 0
62
+ assert result ["summary_read2" ]["minimum_length" ] == 0
63
+ assert result ["summary_read2" ]["total_gc_bases" ] == 0
64
+ assert result ["summary_read2" ]["total_bases" ] == 0
65
+
66
+
54
67
def test_empty_read (tmp_path ):
55
68
empty_read_fastq = TEST_DATA / "empty_read.fastq"
56
69
sys .argv = ["" , "--dir" , str (tmp_path ), str (empty_read_fastq )]
@@ -64,6 +77,20 @@ def test_empty_read(tmp_path):
64
77
assert result ["summary" ]["total_bases" ] == 0
65
78
66
79
80
+ def test_empty_read_paired (tmp_path ):
81
+ empty_read_fastq = TEST_DATA / "empty_read.fastq"
82
+ sys .argv = ["" , "--dir" , str (tmp_path ), str (empty_read_fastq ),
83
+ str (empty_read_fastq )]
84
+ main ()
85
+ simple_fastq_json = tmp_path / "empty_read.fastq.json"
86
+ assert simple_fastq_json .exists ()
87
+ result = json .loads (simple_fastq_json .read_text ())
88
+ assert result ["summary_read2" ]["maximum_length" ] == 0
89
+ assert result ["summary_read2" ]["minimum_length" ] == 0
90
+ assert result ["summary_read2" ]["total_gc_bases" ] == 0
91
+ assert result ["summary_read2" ]["total_bases" ] == 0
92
+
93
+
67
94
def test_adapters_only (tmp_path ):
68
95
adapters_fastq = TEST_DATA / "100_illumina_adapters.fastq"
69
96
sys .argv = ["" , "--dir" , str (tmp_path ),
0 commit comments