(Poly1, Poly2)
| 54 | |
| 55 | |
| 56 | def test_conversion(Poly1, Poly2): |
| 57 | x = np.linspace(0, 1, 10) |
| 58 | coef = random((3,)) |
| 59 | |
| 60 | d1 = Poly1.domain + random((2,))*.25 |
| 61 | w1 = Poly1.window + random((2,))*.25 |
| 62 | p1 = Poly1(coef, domain=d1, window=w1) |
| 63 | |
| 64 | d2 = Poly2.domain + random((2,))*.25 |
| 65 | w2 = Poly2.window + random((2,))*.25 |
| 66 | p2 = p1.convert(kind=Poly2, domain=d2, window=w2) |
| 67 | |
| 68 | assert_almost_equal(p2.domain, d2) |
| 69 | assert_almost_equal(p2.window, w2) |
| 70 | assert_almost_equal(p2(x), p1(x)) |
| 71 | |
| 72 | |
| 73 | def test_cast(Poly1, Poly2): |
nothing calls this directly
no test coverage detected