def test_parse_row_12p(): row13 = ' T12 0/ 9 0/ 0 0/ 4 0/ 0 0/ 3 \n' var, vals = mp.parse_row(row13) truth_var = 'T12' truth_vals = [ None, None, None, None, None, None, '0/ 9', None, None, None, '0/ 0', None, None, None, '0/ 4', None, None, None, '0/ 0', None, '0/ 3' ] assert var == truth_var assert vals == truth_vals
def test_parse_row_6(): row3 = ' P06 0 0 0 0 0 0 1 0 0 0 2 \n' var, vals = mp.parse_row(row3) truth_var = 'P06' truth_vals = [ None, None, '0', None, '0', None, '0', None, '0', None, '0', None, '0', None, '1', None, '0', None, '0', '0', '2' ] assert var == truth_var assert vals == truth_vals
def test_parse_row_12(): row3 = ' N/X 28 57 32 55 34 \n' var, vals = mp.parse_row(row3) truth_var = 'N/X' truth_vals = [ None, None, None, None, '28', None, None, None, '57', None, None, None, '32', None, None, None, '55', None, None, '34', None ] assert var == truth_var assert vals == truth_vals
def test_parse_row_all_values(): row5 = ' DPT 14 24 29 29 28 28 32 31 30 35 34 33 32 32 37 36 35 35 34 33 38 \n' var, vals = mp.parse_row(row5) truth_var = 'DPT' truth_vals = [ '14', '24', '29', '29', '28', '28', '32', '31', '30', '35', '34', '33', '32', '32', '37', '36', '35', '35', '34', '33', '38' ] assert var == truth_var assert vals == truth_vals
def test_parse_row_6p(): row13 = ' T06 0/ 0 0/ 4 0/ 0 0/ 0 0/ 0 0/ 1 0/ 0 0/ 0 0/ 0 0/ 0 \n' var, vals = mp.parse_row(row13) truth_var = 'T06' truth_vals = [ None, None, '0/ 0', None, '0/ 4', None, '0/ 0', None, '0/ 0', None, '0/ 0', None, '0/ 1', None, '0/ 0', None, '0/ 0', None, '0/ 0', None, '0/ 0' ] assert var == truth_var assert vals == truth_vals