def test_RightHalf(self): (rows, cols) = chop(get_all_seats(), "R") self.assertListEqual(rows, [x for x in range(128)]) self.assertListEqual(cols, [4, 5, 6, 7])
def test_LeftHalf(self): (rows, cols) = chop(get_all_seats(), "L") self.assertListEqual(rows, [x for x in range(128)]) self.assertListEqual(cols, [0, 1, 2, 3])
def test_FirstTest(self): (rows, cols) = chop(get_all_seats(), "F") self.assertListEqual(rows, [x for x in range(64)]) self.assertListEqual(cols, [x for x in range(8)])
def test_BottomHalf(self): (rows, cols) = chop(get_all_seats(), "B") self.assertListEqual(rows, [x for x in range(64, 128)]) self.assertListEqual(cols, [x for x in range(8)])
def test_getSeats(self): rows = [x for x in range(128)] cols = [c for c in range(8)] self.assertListEqual(get_all_seats()[0], rows) self.assertListEqual(get_all_seats()[1], cols)