예제 #1
0
 def test_ten_rows(self):
     self.assertEqual(rows(10), TRIANGLE[:10])
예제 #2
0
 def test_negative_rows(self):
     self.assertEqual(rows(-1), None)
예제 #3
0
 def test_five_rows(self):
     self.assertEqual(rows(5), TRIANGLE[:5])
예제 #4
0
 def test_six_rows(self):
     self.assertEqual(rows(6), TRIANGLE[:6])
예제 #5
0
 def test_four_rows(self):
     self.assertEqual(rows(4), TRIANGLE[:4])
예제 #6
0
 def test_three_rows(self):
     self.assertEqual(rows(3), TRIANGLE[:3])
예제 #7
0
 def test_two_rows(self):
     self.assertEqual(rows(2), TRIANGLE[:2])
예제 #8
0
 def test_single_row(self):
     self.assertEqual(rows(1), TRIANGLE[:1])
예제 #9
0
 def test_zero_rows(self):
     self.assertEqual(rows(0), [])