Skip to content

Commit ce37a6e

Browse files
committed
Validate allele format
- Validate that the format of the fields are correct. eg. `DQA1*01:01:01:G` is invalid
1 parent 4d4c7ea commit ce37a6e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/test_pyard.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,11 @@ def test_fp_allele(self):
142142
with self.assertRaises(InvalidTypingError):
143143
self.ard.redux("A*0.123", "lgx")
144144

145+
def test_empty_fields(self):
146+
with self.assertRaises(InvalidTypingError):
147+
# : without any data
148+
self.ard.redux("DQA1*01:01:01:G", "lgx")
149+
145150
def test_invalid_serology(self):
146151
# Test that A10 works and the first one is 'A*25:01'
147152
serology_a10 = self.ard.redux("A10", "lgx")

0 commit comments

Comments
 (0)