style: apply black formatting to test files

This commit is contained in:
2026-10-02 14:32:04 +03:00
parent 7e31ac4b4e
commit 7f47a876ae
3 changed files with 42 additions and 42 deletions
+9 -9
View File
@@ -637,9 +637,9 @@ class TestMultiBranchEdgeCases:
W, _ = spectrum.get_energy_grid(config)
values = spectrum(W)
assert np.all(
np.isfinite(values)
), "High-Z multi-branch must not produce NaN/inf"
assert np.all(np.isfinite(values)), (
"High-Z multi-branch must not produce NaN/inf"
)
def test_no_branches_defaults_to_single(self):
"""No branches list should default to single-branch mode."""
@@ -705,9 +705,9 @@ class TestMultiBranchEdgeCases:
contrib = universal_product * branch.intensity * bs[i]
# Branch contribution should not exceed total
assert np.all(
contrib <= total + 1e-10
), f"Branch {i} contribution exceeds total at some points"
assert np.all(contrib <= total + 1e-10), (
f"Branch {i} contribution exceeds total at some points"
)
# Branch contribution should be non-negative
assert np.all(contrib >= 0), f"Branch {i} contribution has negative values"
@@ -759,6 +759,6 @@ class TestMultiBranchEdgeCases:
assert integral > 0, f"Branch {i} has zero integral"
# Sum of branch integrals should equal total
assert np.isclose(
sum(integrals), total_integral, rtol=1e-6
), "Sum of branch integrals should equal total integral"
assert np.isclose(sum(integrals), total_integral, rtol=1e-6), (
"Sum of branch integrals should equal total integral"
)