def test_normalize_exchange_special_1(self): sequence = [1, 2, '-', 3, '-'] sf = SuffixFormula() for s in sequence: sf.push(s) new_seq = sf._normalize_exchange_special(sequence, '-') self.assertEqual(new_seq, sequence)
def test_normalize_exchange_special_2(self): sequence = [3, 2, '-', 1, '-'] expected = [3, 1, '-', 2, '-'] sf = SuffixFormula() for s in sequence: sf.push(s) new_seq = sf._normalize_exchange_special(sequence, '-') self.assertEqual(new_seq, expected)