def test_io(self, tmpdir): self.fit_result.to_yaml(tmpdir / 'test.yaml') read_result = SpectrumFitResult.from_yaml(tmpdir / 'test.yaml') test_e = 12.5 * u.TeV assert_quantity_allclose(self.fit_result.model(test_e), read_result.model(test_e))