Skip to content

Commit

Permalink
update comments in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bradyrx committed Aug 11, 2020
1 parent 8e8cf00 commit 8690b69
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions xskillscore/tests/test_probabilistic.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ def test_crps_ensemble_dask(o_dask, f_dask):
actual = crps_ensemble(o_dask, f_dask)
expected = properscoring.crps_ensemble(o_dask, f_dask, axis=0)
expected = xr.DataArray(expected, coords=o_dask.coords)
# test for numerical identity of xr_crps and crps
# test for numerical identity of xskillscore crps and properscoring crps
assert_allclose(actual, expected)
# test that xr_crps_ensemble returns chunks
# test that xskillscore crps_ensemble returns chunks
assert actual.chunks is not None
# show that crps_ensemble returns no chunks
# show that properscoring crps_ensemble returns no chunks
assert expected.chunks is None


Expand All @@ -93,11 +93,11 @@ def test_crps_gaussian_dask(o_dask, f_dask):
actual = crps_gaussian(o_dask, mu, sig)
expected = properscoring.crps_gaussian(o_dask, mu, sig)
expected = xr.DataArray(expected, coords=o_dask.coords)
# test for numerical identity of xr_crps and crps
# test for numerical identity of xskillscore crps and properscoring crps
assert_allclose(actual, expected)
# test that xr_crps_ensemble returns chunks
# test that xskillscore crps_ensemble returns chunks
assert actual.chunks is not None
# show that crps_ensemble returns no chunks
# show that properscoring crps_ensemble returns no chunks
assert expected.chunks is None


Expand All @@ -121,11 +121,11 @@ def test_crps_quadrature_dask(o_dask):
actual = crps_quadrature(o_dask, cdf_or_dist)
expected = properscoring.crps_quadrature(o_dask, cdf_or_dist)
expected = xr.DataArray(expected, coords=o_dask.coords)
# test for numerical identity of xr_crps and crps
# test for numerical identity of xskillscore crps and properscoring crps
assert_allclose(actual, expected)
# test that xr_crps_ensemble returns chunks
# test that xskillscore crps_ensemble returns chunks
assert actual.chunks is not None
# show that crps_ensemble returns no chunks
# show that properscoring crps_ensemble returns no chunks
assert expected.chunks is None


Expand All @@ -135,11 +135,11 @@ def test_crps_quadrature_args(o_dask, f_dask):
actual = crps_quadrature(o_dask, cdf_or_dist, xmin, xmax, tol)
expected = properscoring.crps_quadrature(o_dask, cdf_or_dist, xmin, xmax, tol)
expected = xr.DataArray(expected, coords=o_dask.coords)
# test for numerical identity of xr_crps and crps
# test for numerical identity of xskillscore crps and crps
assert_allclose(actual, expected)
# test that xr_crps_ensemble returns chunks
# test that xskillscore crps_ensemble returns chunks
assert actual.chunks is not None
# show that crps_ensemble returns no chunks
# show that properscoring crps_ensemble returns no chunks
assert expected.chunks is None


Expand All @@ -155,11 +155,11 @@ def test_threshold_brier_score_dask(o_dask, f_dask):
actual = threshold_brier_score(o_dask, f_dask, threshold)
expected = properscoring.threshold_brier_score(o_dask, f_dask, threshold, axis=0)
expected = xr.DataArray(expected, coords=o_dask.coords)
# test for numerical identity of xr_threshold and threshold
# test for numerical identity of xskillscore threshold and properscoring threshold
assert_identical(actual, expected)
# test that xr_crps_ensemble returns chunks
# test that xskillscore crps_ensemble returns chunks
assert actual.chunks is not None
# show that crps_ensemble returns no chunks
# show that properscoring crps_ensemble returns no chunks
assert expected.chunks is None


Expand Down Expand Up @@ -201,9 +201,9 @@ def test_brier_score_dask(o_dask, f_dask):
assert actual.chunks is not None
expected = properscoring.brier_score((o_dask > 0.5), (f_dask > 0.5).mean('member'))
expected = xr.DataArray(expected, coords=o_dask.coords)
# test for numerical identity of xr_brier_score and brier_score
# test for numerical identity of brier_score and properscoring brier_score
assert_allclose(actual, expected)
# test that xr_brier_score returns chunks
# test that xskillscore brier_score returns chunks
assert actual.chunks is not None
# show that brier_score returns no chunks
# show that properscoring brier_score returns no chunks
assert expected.chunks is None

0 comments on commit 8690b69

Please sign in to comment.