Skip to content

Commit

Permalink
fix: style and errors
Browse files Browse the repository at this point in the history
  • Loading branch information
martahan committed Jun 7, 2024
1 parent cbd08fc commit c5a641a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions seismostats/seismicity/tests/test_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ def test_forecast_catalog_strip():
"mag_values, delta_m"
[
(np.array([0.235, -0.235, 4.499, 4.5, 6, 0.1, 1.6]),
0.1,
np.array([0.235, -0.235, 4.499, 4.5, 6, 0.1, 1.6]),
None,
0.1),
(np.array([0.235, -0.235, 4.499, 4.5, 6, 0.1, 1.6]),
None),
(np.array([0.235, -0.235, 4.499, 5.5, 6, 0.1, 1.6]),
0.2,
0.2),
([0.235, -0.235, 4.499, 5.5, 6, 0.1, 1.6],
0.2,
0.2),
]
)
def test_catalog_bin():
Expand All @@ -107,22 +107,22 @@ def test_catalog_bin():
def test_catalog_bin_none():
catalog = Catalog({'magnitude': []})
with pytest.raises(ValueError):
catalog.bin_magnitudes()
catalog.bin_magnitudes()


def test_catalog_estimate_mc():
catalog = Catalog({'magnitude': [0.235, -0.235, 4.499, 4.5, 6, 0.1, 1.6]})

with pytest.raises(ValueError):
catalog.estimate_mc()


def test_catalog_estimate_b():
catalog = Catalog({'magnitude': [0.235, -0.235, 4.499, 4.5, 6, 0.1, 1.6]})

with pytest.raises(ValueError):
catalog.estimate_b(None, None)
catalog.estimate_b(mc=1.0, None)
catalog.estimate_b(mc=None, delta_m=None)
catalog.estimate_b(mc=1.0, delta_m=None)
catalog.estimate_b(mc=None, delta_m=0.1)


Expand Down

0 comments on commit c5a641a

Please sign in to comment.