def test_verbosity_true_(capsys): d1 = np.random.normal(size=1000) d2 = d1 ks(d1, d2, verbose=True) captured = capsys.readouterr() assert captured.out == "\nKS: pvalue = 1.0\n\nKS: Null hypothesis cannot be rejected. Distributions not statistically different.\n" es(d1, d2, verbose=True) captured = capsys.readouterr() assert captured.out == "\nES: pvalue = 1.0\n\nES: Null hypothesis cannot be rejected. Distributions not statistically different.\n"
def test_es_returns_small(): """ Test. """ d1 = np.random.normal(size=1000) d2 = np.random.weibull(1, size=1000) - 1 assert es(d1, d2)[1] < 0.001
def test_es_returns_one(): """ Test. """ d1 = np.random.normal(size=1000) d2 = d1 assert es(d1, d2)[1] == 1.0
def test_es_returns_small(): '''Epps-Singleton test statistic returns small value (<0.001)''' d1 = np.random.normal(size=1000) d2 = np.random.weibull(1, size=1000) - 1 assert es(d1, d2)[1] < 0.001
def test_es_returns_one(): '''Epps-Singleton test statistic returns one''' d1 = np.random.normal(size=1000) d2 = d1 assert es(d1, d2)[1] == 1.0