(Poly1, Poly2)
| 60 | |
| 61 | |
| 62 | def test_conversion(Poly1, Poly2): |
| 63 | x = np.linspace(0, 1, 10) |
| 64 | coef = random((3,)) |
| 65 | |
| 66 | d1 = Poly1.domain + random((2,)) * .25 |
| 67 | w1 = Poly1.window + random((2,)) * .25 |
| 68 | p1 = Poly1(coef, domain=d1, window=w1) |
| 69 | |
| 70 | d2 = Poly2.domain + random((2,)) * .25 |
| 71 | w2 = Poly2.window + random((2,)) * .25 |
| 72 | p2 = p1.convert(kind=Poly2, domain=d2, window=w2) |
| 73 | |
| 74 | assert_almost_equal(p2.domain, d2) |
| 75 | assert_almost_equal(p2.window, w2) |
| 76 | assert_almost_equal(p2(x), p1(x)) |
| 77 | |
| 78 | |
| 79 | def test_cast(Poly1, Poly2): |
nothing calls this directly
no test coverage detected
searching dependent graphs…