docs: update documentation files and fix linting issues
This commit is contained in:
@@ -39,13 +39,17 @@ class TestRadiativeAPI:
|
||||
|
||||
class TestRadiativeProperties:
|
||||
@pytest.mark.property
|
||||
@pytest.mark.parametrize("W", [
|
||||
[2.0],
|
||||
np.linspace(1.1, 4.9, 20),
|
||||
])
|
||||
@pytest.mark.parametrize(
|
||||
"W",
|
||||
[
|
||||
[2.0],
|
||||
np.linspace(1.1, 4.9, 20),
|
||||
],
|
||||
)
|
||||
def test_positive(self, W):
|
||||
rc = RadiativeCorrection(W0=5.0)
|
||||
from tests.common.test_property_tests import _test_positive_values
|
||||
|
||||
_test_positive_values(rc, W, component_name="RadiativeCorrection")
|
||||
|
||||
@pytest.mark.quality
|
||||
@@ -54,6 +58,7 @@ class TestRadiativeProperties:
|
||||
rc = RadiativeCorrection(W0=5.0)
|
||||
W = np.linspace(1.1, 4.9, n)
|
||||
from tests.common.test_property_tests import _test_output_shape_preserved
|
||||
|
||||
_test_output_shape_preserved(rc, W, component_name="RadiativeCorrection")
|
||||
|
||||
@pytest.mark.quality
|
||||
@@ -63,17 +68,22 @@ class TestRadiativeProperties:
|
||||
rc = RadiativeCorrection(W0=W0)
|
||||
W = np.linspace(1.1, min(9.9, W0 - 0.01), 20)
|
||||
from tests.common.test_property_tests import _test_no_nan_across_range
|
||||
|
||||
_test_no_nan_across_range(rc, W, component_name=f"RadiativeCorrection(W0={W0})")
|
||||
|
||||
@pytest.mark.quality
|
||||
@pytest.mark.parametrize("W", [
|
||||
np.linspace(1.0001, 4.9999, 200),
|
||||
np.linspace(1.001, 9.99, 100),
|
||||
])
|
||||
@pytest.mark.parametrize(
|
||||
"W",
|
||||
[
|
||||
np.linspace(1.0001, 4.9999, 200),
|
||||
np.linspace(1.001, 9.99, 100),
|
||||
],
|
||||
)
|
||||
def _test_full_range_stability(self, W):
|
||||
"""Entire energy range from threshold to endpoint must be free of NaN/inf."""
|
||||
rc = RadiativeCorrection(W0=5.0, Z=92, use_endpoint_resummation=True)
|
||||
from tests.common.test_property_tests import _test_full_range_stability
|
||||
|
||||
_test_full_range_stability(rc, W, component_name="RadiativeCorrection(Z=92)")
|
||||
|
||||
@pytest.mark.quality
|
||||
|
||||
Reference in New Issue
Block a user