style: reformat assertion blocks in test files
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user