예제 #1
0
import sys

from link_data import Rectangle

if __name__ == '__main__':
    w = int(sys.argv[1])
    h = int(sys.argv[2])
    r = Rectangle(w, h, 3)
    print r.header_text()

예제 #2
0
 def test_number_of_rows_for_3_by_3_square(self):
     r = Rectangle(3, 3)
     rows = r.row_list()
     self.assertEqual(len(rows), 8 + 5 * 9)
예제 #3
0
 def test_number_of_column_names_for_3_by_3_square(self):
     r = Rectangle(3, 3)
     names = list(r.names())
     self.assertEqual(len(names), 3*3 + 5)
예제 #4
0
 def test_some_output_for_3_by_3_square(self):
     r = Rectangle(3, 3)
     self.assertIsNotNone(r.header_text())
예제 #5
0
 def test_tetromino_row_for_3_by_3_square(self):
     r = Rectangle(3, 3)
     rows = r.row_list()
     row1 = [1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]
     self.assertIn(row1, rows)