예제 #1
0
 def test10(self):
     self.assertEqual(hw4_pascal.pascal_triangle((2)),
                      [[1], [1, 1], [1, 2, 1]])
예제 #2
0
 def test09(self):
     self.assertEqual(hw4_pascal.pascal_triangle((1)), [[1], [1, 1]])
예제 #3
0
 def test07(self):
     self.assertEqual(hw4_pascal.pascal_triangle((0)), [[1]])
예제 #4
0
 def test08(self):
     self.assertEqual(hw4_pascal.pascal_triangle((-1)), float("inf"))
예제 #5
0
 def test06(self):
     self.assertEqual(hw4_pascal.pascal_triangle((5)),[[1], [1, 1], \
     [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1], [1, 5, 10, 10, 5, 1]])