(roots, expected_in_01)
| 25 | ([0.3, 0.3], [0.3, 0.3]), # repeated root |
| 26 | ]) |
| 27 | def test_real_roots_in_01(roots, expected_in_01): |
| 28 | roots = np.array(roots) |
| 29 | coeffs = np.poly(roots)[::-1] # np.poly gives descending, we need ascending |
| 30 | result = _real_roots_in_01(coeffs.real) |
| 31 | assert_allclose(result, expected_in_01, atol=1e-10) |
| 32 | |
| 33 | |
| 34 | @pytest.mark.parametrize("coeffs", [[5], [0, 0, 0]]) |
nothing calls this directly
no test coverage detected
searching dependent graphs…