@@ -23,29 +23,29 @@ def legendre(n: int) -> [float]:
23
23
return legendre_polynomial .deriv (n ).coef .tolist ()
24
24
25
25
26
- def test_legendre_0 ():
26
+ def test_legendre_0 () -> None :
27
27
"""Test the 0th Legendre polynomial."""
28
28
assert legendre (0 ) == [1.0 ], "The 0th Legendre polynomial should be [1.0]"
29
29
30
30
31
- def test_legendre_1 ():
31
+ def test_legendre_1 () -> None :
32
32
"""Test the 1st Legendre polynomial."""
33
33
assert legendre (1 ) == [0.0 , 1.0 ], "The 1st Legendre polynomial should be [0.0, 1.0]"
34
34
35
35
36
- def test_legendre_2 ():
36
+ def test_legendre_2 () -> None :
37
37
"""Test the 2nd Legendre polynomial."""
38
38
assert legendre (2 ) == [- 0.5 , 0.0 , 1.5 ]
39
39
"The 2nd Legendre polynomial should be [-0.5, 0.0, 1.5]"
40
40
41
41
42
- def test_legendre_3 ():
42
+ def test_legendre_3 () -> None :
43
43
"""Test the 3rd Legendre polynomial."""
44
44
assert legendre (3 ) == [0.0 , - 1.5 , 0.0 , 2.5 ]
45
45
"The 3rd Legendre polynomial should be [0.0, -1.5, 0.0, 2.5]"
46
46
47
47
48
- def test_legendre_4 ():
48
+ def test_legendre_4 () -> None :
49
49
"""Test the 4th Legendre polynomial."""
50
50
assert legendre (4 ) == pytest .approx ([0.375 , 0.0 , - 3.75 , 0.0 , 4.375 ])
51
51
"The 4th Legendre polynomial should be [0.375, 0.0, -3.75, 0.0, 4.375]"
0 commit comments