(Poly)
| 511 | |
| 512 | |
| 513 | def test_pow(Poly): |
| 514 | d = Poly.domain + random((2,)) * .25 |
| 515 | w = Poly.window + random((2,)) * .25 |
| 516 | tgt = Poly([1], domain=d, window=w) |
| 517 | tst = Poly([1, 2, 3], domain=d, window=w) |
| 518 | for i in range(5): |
| 519 | assert_poly_almost_equal(tst**i, tgt) |
| 520 | tgt = tgt * tst |
| 521 | # default domain and window |
| 522 | tgt = Poly([1]) |
| 523 | tst = Poly([1, 2, 3]) |
| 524 | for i in range(5): |
| 525 | assert_poly_almost_equal(tst**i, tgt) |
| 526 | tgt = tgt * tst |
| 527 | # check error for invalid powers |
| 528 | assert_raises(ValueError, op.pow, tgt, 1.5) |
| 529 | assert_raises(ValueError, op.pow, tgt, -1) |
| 530 | |
| 531 | |
| 532 | def test_call(Poly): |
nothing calls this directly
no test coverage detected
searching dependent graphs…