def test_number_of_rows_for_deficient_3_by_3_square(self): r = DeficientRectangle(3, 3, 4, [(0, 0)]) rows = r.row_list() # 6 positions to place a t-tetromino # 4 monominos in each of the eight squares # 1 'magic monomino' in the (0,0) square self.assertEqual(len(rows), 6 + 4 * 8 + 1)
def test_the_number_of_rows_and_names_is_the_same(self): r = DeficientRectangle(3, 3, 4, [(0, 0)]) rows = r.row_list() names = list(r.names()) self.assertEqual(len(names), len(rows[0]))