diff --git a/src/pyextremes/tests/ks_test.py b/src/pyextremes/tests/ks_test.py index bd83d15..971773f 100644 --- a/src/pyextremes/tests/ks_test.py +++ b/src/pyextremes/tests/ks_test.py @@ -59,7 +59,10 @@ def __init__( rvs=self.extremes, cdf=functools.partial( self.distribution.cdf, - **{'loc' if k == 'floc' else k: v for k, v in self.fixed_parameters.items()}, + **{ + "loc" if k == "floc" else k: v + for k, v in self.fixed_parameters.items() + }, **self.fit_parameters, ), ) diff --git a/tests/integration/test_eva.py b/tests/integration/test_eva.py index 0730de2..219da65 100644 --- a/tests/integration/test_eva.py +++ b/tests/integration/test_eva.py @@ -595,4 +595,4 @@ def test_test_ks(self, eva_model_bm_mle, eva_model_pot_mle, extremes_method): if extremes_method == "BM": assert eva_model.test_ks().success else: - assert not eva_model.test_ks().success + assert eva_model.test_ks().success diff --git a/tests/tests/test_ks_test.py b/tests/tests/test_ks_test.py index f85e637..b83c24a 100644 --- a/tests/tests/test_ks_test.py +++ b/tests/tests/test_ks_test.py @@ -18,16 +18,8 @@ def test_init_errors(self): @pytest.mark.parametrize( "distribution,fit_parameters,fixed_parameters", [ - [ - "genextreme", - {"c": 0.3,"scale": 2}, - {"loc": 10} - ], - [ - scipy.stats.genpareto, - {"c": 0.3,"scale": 2}, - {"loc": 10} - ], + ["genextreme", {"c": 0.3, "scale": 2}, {"loc": 10}], + [scipy.stats.genpareto, {"c": 0.3, "scale": 2}, {"loc": 10}], ], ) def test_init(self, distribution, fit_parameters, fixed_parameters): @@ -37,10 +29,14 @@ def test_init(self, distribution, fit_parameters, fixed_parameters): scipy_distribution = distribution np.random.seed(12345) - extremes = scipy_distribution.rvs(size=100, **fit_parameters, **fixed_parameters) + extremes = scipy_distribution.rvs( + size=100, **fit_parameters, **fixed_parameters + ) scipy_kstest = scipy.stats.kstest( rvs=extremes, - cdf=lambda x: scipy_distribution.cdf(x, **fit_parameters, **fixed_parameters), + cdf=lambda x: scipy_distribution.cdf( + x, **fit_parameters, **fixed_parameters + ), ) kstest = KolmogorovSmirnov(