def test_unpack_composed_header_ranges(self): exp = ["A5_B5", "A6_B6", "A7_B7", "A8_B8"] self.assertEqual( Parameters._unpack_header_ranges("(a5_B5)-(A8_B8)"), exp) exp = [["A1_B1", "A2_B2", "A3_B3"], ["A1_B1", "A2_B2", "A3_B3"]] orig = [["(A1_B1)-(A3_b3)"], ["(A1_B1)-(A3_b3)"]] self.assertEqual(Parameters._unpack_header_ranges(orig), exp)
def test_unpack_header_ranges(self): exp = ["A5", "A6", "A7", "A8"] self.assertEqual(Parameters._unpack_header_ranges("a5-A8"), exp) exp = ["A5", "B5", "C5"] self.assertEqual(Parameters._unpack_header_ranges("A5-c5"), exp) exp = ["A5"] self.assertEqual(Parameters._unpack_header_ranges("a5"), exp) exp = None self.assertEqual(Parameters._unpack_header_ranges("None"), exp) exp = [["A1", "A2"], ["A1", "A2"]] orig = [["A1", "A2"], ["A1", "A2"]] self.assertEqual(Parameters._unpack_header_ranges(orig), exp) exp = [["A1", "A2", "A3"], ["A1", "A2", "A3"]] orig = [["A1-A3"], ["A1-A3"]] self.assertEqual(Parameters._unpack_header_ranges(orig), exp)