def test_modseq_interleaved(self): # Unlikely but test it anyway. out = parse_message_list([b'1 2 (modseq 9) 3 4']) self.assertSequenceEqual(out, [1, 2, 3, 4]) self.assertEqual(out.modseq, 9)
def test_one_id(self): self.assertSequenceEqual(parse_message_list([b'4']), [4])
def test_modseq_no_space(self): out = parse_message_list([b'1 2 3(modseq 999)']) self.assertSequenceEqual(out, [1, 2, 3]) self.assertEqual(out.modseq, 999)
def test_basic(self): out = parse_message_list([b'1 2 3']) self.assertSequenceEqual(out, [1, 2, 3]) self.assertEqual(out.modseq, None)