@@ -44,15 +44,23 @@ class TestWriter(BaseSNPsTestCase):
44
44
def test_save_snps (self ):
45
45
snps = SNPs ("tests/input/generic.csv" )
46
46
self .assertEqual (os .path .relpath (snps .save_snps ()), "output/generic_GRCh37.csv" )
47
- self .run_parsing_tests ("output/generic_GRCh37.csv" , "generic" )
47
+ self .run_parsing_tests (
48
+ "output/generic_GRCh37.csv" ,
49
+ "generic" ,
50
+ build_detected = True , # build will be detected from comments because save_snps() writes the build into comments
51
+ )
48
52
49
53
def test_save_snps_tsv (self ):
50
54
snps = SNPs ("tests/input/generic.csv" )
51
55
self .assertEqual (
52
56
os .path .relpath (snps .save_snps ("generic.tsv" , sep = "\t " )),
53
57
"output/generic.tsv" ,
54
58
)
55
- self .run_parsing_tests ("output/generic.tsv" , "generic" )
59
+ self .run_parsing_tests (
60
+ "output/generic.tsv" ,
61
+ "generic" ,
62
+ build_detected = True , # build will be detected from comments because save_snps() writes the build into comments
63
+ )
56
64
57
65
def test_save_snps_vcf (self ):
58
66
s = SNPs ("tests/input/testvcf.vcf" )
@@ -104,9 +112,17 @@ def test_save_snps_csv_phased(self):
104
112
# save phased data to CSV
105
113
self .assertEqual (os .path .relpath (s .save_snps ()), "output/vcf_GRCh37.csv" )
106
114
# read saved CSV
107
- self .run_parsing_tests_vcf ("output/vcf_GRCh37.csv" , phased = True )
115
+ self .run_parsing_tests_vcf (
116
+ "output/vcf_GRCh37.csv" ,
117
+ phased = True ,
118
+ build_detected = True , # build will be detected from comments because save_snps() writes the build into comments
119
+ )
108
120
109
121
def test_save_snps_specify_file (self ):
110
122
s = SNPs ("tests/input/generic.csv" )
111
123
self .assertEqual (os .path .relpath (s .save_snps ("snps.csv" )), "output/snps.csv" )
112
- self .run_parsing_tests ("output/snps.csv" , "generic" )
124
+ self .run_parsing_tests (
125
+ "output/snps.csv" ,
126
+ "generic" ,
127
+ build_detected = True , # build will be detected from comments because save_snps() writes the build into comments
128
+ )
0 commit comments