(Poly)
| 493 | |
| 494 | |
| 495 | def test_pow(Poly): |
| 496 | d = Poly.domain + random((2,))*.25 |
| 497 | w = Poly.window + random((2,))*.25 |
| 498 | tgt = Poly([1], domain=d, window=w) |
| 499 | tst = Poly([1, 2, 3], domain=d, window=w) |
| 500 | for i in range(5): |
| 501 | assert_poly_almost_equal(tst**i, tgt) |
| 502 | tgt = tgt * tst |
| 503 | # default domain and window |
| 504 | tgt = Poly([1]) |
| 505 | tst = Poly([1, 2, 3]) |
| 506 | for i in range(5): |
| 507 | assert_poly_almost_equal(tst**i, tgt) |
| 508 | tgt = tgt * tst |
| 509 | # check error for invalid powers |
| 510 | assert_raises(ValueError, op.pow, tgt, 1.5) |
| 511 | assert_raises(ValueError, op.pow, tgt, -1) |
| 512 | |
| 513 | |
| 514 | def test_call(Poly): |
nothing calls this directly
no test coverage detected