diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3585a83..979233f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,7 +24,7 @@ repos: args: ["--skip=src/otherCode,*.ipynb,*.pdf,*.svg", "-w", "docs", "src"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.16.4 + rev: v0.16.6 hooks: - id: ruff-check args: ["--color", "always"] diff --git a/pyproject.toml b/pyproject.toml index 265a03f..a1ea1b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -120,6 +120,7 @@ ignore = [ "E226", # missing whitespace around arthmetic operator "TD002", # missing todo author "TD003", # missing todo link + "float-equality-comparison", ] extend-select = [ diff --git a/tests/test_misc.py b/tests/test_misc.py index af4b6e6..32dacb4 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -33,6 +33,8 @@ def models(): def test_theoretical_Sa(): with pytest.raises(ValueError): theoretical_Sa(ts=-45.0, eba=20.1, r=10) + + with pytest.raises(ValueError): theoretical_Sa(ts=-45.0, eba=-20.1, r=0.0) diff --git a/tests/test_model_outputs.py b/tests/test_model_outputs.py index d7a911a..cce51d6 100644 --- a/tests/test_model_outputs.py +++ b/tests/test_model_outputs.py @@ -88,8 +88,8 @@ def test_psmsmodel(rm, reference_model, f, theta, ts): mod.calculate_ts_single(**m, validate_parameters=True) + m['boundary_type'] = echosms.boundary_type.none with pytest.raises(ValueError): - m['boundary_type'] = echosms.boundary_type.none mod.calculate_ts_single(**m, validate_parameters=False) @@ -169,8 +169,8 @@ def test_kamodel(rm): assert np.allclose(mod.calculate_ts(p), -44.4474, atol=0.0001), "Incorrect TS value" # check the invalid boundary type code + p['boundary_type'] = echosms.boundary_type.none with pytest.raises(ValueError): - p['boundary_type'] = echosms.boundary_type.none mod.calculate_ts_single(**p, validate_parameters=False)