style: reformat assertion blocks in test files

This commit is contained in:
2026-09-29 13:06:22 +03:00
parent be3e288e0d
commit 687e05cbe2
2 changed files with 20 additions and 22 deletions
+4 -3
View File
@@ -179,6 +179,7 @@ class TestDeclarativeDetectorResponse:
detector = BetaSpectrum.create_detector_from_config(config)
from beta_spectrum.components.detector_response import DetectorResponse
assert isinstance(detector, DetectorResponse)
assert detector.n_channels == 512
assert detector._mode == "analytical"
@@ -278,9 +279,9 @@ class TestDeclarativeDetectorResponse:
assert convolved.shape == (256,)
# Normalized spectrum should integrate to ~1 over channel energies
integral = np.trapezoid(convolved, detector.channel_energies)
assert np.isclose(
integral, 1.0, rtol=0.05
), f"Integral should be ~1.0, got {integral}"
assert np.isclose(integral, 1.0, rtol=0.05), (
f"Integral should be ~1.0, got {integral}"
)
@pytest.mark.skip(reason="DetectorResponse not yet implemented")
def test_detector_range_extends_to_endpoint(self):