def test_adjacent_series_rotate(self):
     a1 = AdjacencySeries([-1, 1, 1, 1])
     a2 = AdjacencySeries([1, 1, 1, -1])
     a3 = AdjacencySeries([1, 1, -1, 1])
     self.assertEqual(a1.rotate(), a2)
     self.assertEqual(a1.rotate(2), a3)
 def test_adjacent_series_invert(self):
     a1 = AdjacencySeries([-1, 1, 1])
     a2 = AdjacencySeries([1, -1, -1])
     self.assertEqual(a1.invert(), a2)
 def test_adjacent_series_check_adjacent_repeated_cps(self):
     a1 = AdjacencySeries([-1, 0, 1, 0, -1])
     a1.check_adjacent_repeated_cps()
     a2 = AdjacencySeries([-1, 1, -1])
     self.assertEqual(a1, a2)
 def test_adjacent_series_retrograde(self):
     a1 = AdjacencySeries([-1, 1, 1])
     a2 = AdjacencySeries([1, 1, -1])
     self.assertEqual(a1.retrograde(), a2)
 def test_adjacent_series_remove_adjacent_repeated_cps(self):
     a1 = AdjacencySeries([-1, 0, 1, 0, -1])
     a2 = AdjacencySeries([-1, 1, -1])
     self.assertEqual(a1.remove_adjacent_repeated_cps(), a2)