| Conditions | 1 |
| Total Lines | 10 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | # -*- coding: utf-8 -*- |
||
| 34 | @pytest.mark.parametrize( |
||
| 35 | "pflux_func", |
||
| 36 | PFLUX_ENORM, |
||
| 37 | ) |
||
| 38 | def test_pflux_norm(pflux_func): |
||
| 39 | energies = np.logspace(-2, 4, 257) |
||
| 40 | spec = pflux_func(energies) |
||
| 41 | norm = np.trapz(spec * energies, energies) |
||
| 42 | np.testing.assert_allclose(norm, 1., rtol=1e-3) |
||
| 43 | return |
||
| 44 |