Skip to content

Commit b390f7f

Browse files
committed
Add more tests for sample shee parsing with underscores
1 parent f75c583 commit b390f7f

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

micall/tests/test_sample_sheet_parser.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ def test_extra_commas(self):
733733

734734
def test_underscores_in_sample_name(self):
735735
"""
736-
Extracts the correct project code having multiple options.
736+
Extracts the correct project code and sample name in presence of underscores.
737737
"""
738738

739739
stub_sample_sheet = """
@@ -764,9 +764,19 @@ def test_underscores_in_sample_name(self):
764764
ss = sample_sheet_parser(StringIO(stub_sample_sheet))
765765
split_rows = ss['DataSplit']
766766
assert len(split_rows) == 2
767+
768+
assert split_rows[0]['filename'] == 'Sample1-Proj1_S1'
769+
assert split_rows[1]['filename'] == 'Sample2-Proj2_S2'
770+
767771
assert split_rows[0]['project'] == 'Proj1'
768772
assert split_rows[1]['project'] == 'Proj2'
769773

774+
assert split_rows[0]['sample'] == 'Sample1'
775+
assert split_rows[1]['sample'] == 'Sample2'
776+
777+
assert split_rows[0]['sample_number'] == 'S1'
778+
assert split_rows[1]['sample_number'] == 'S2'
779+
770780

771781
def test_read_sample_sheet_overrides(tmpdir):
772782
sample_sheet_path = Path(str(tmpdir)) / 'SampleSheet.csv'

0 commit comments

Comments
 (0)