#NEWLINE# def test_PoissonDistribution( ) : #NEWLINE# #INDENT# l = 3 #NEWLINE# p = PoissonDistribution ( l ) #NEWLINE# assert ( abs ( ( p . cdf ( 10 ) . evalf ( ) - 1 ) ) < 0.001 ) #NEWLINE# assert ( p . expectation ( x , x ) == l ) #NEWLINE# assert ( ( p . expectation ( ( x ** 2 ) , x ) - ( p . expectation ( x , x ) ** 2 ) ) == l )