<commit_before>from numpy.testing import assert_, assert_raises
from scipy import stats
import nose
from statsmodels.stats._lilliefors import lilliefors
import numpy as np

class TestLilliefors(object):

    def test_normal(self):
        np.random.seed(3975)
        x_n = stats.norm.rvs(size=5000)
        d_ks, p = lilliefors(x_n, dist='norm')
        assert_(p > 0.05)

    def test_expon(self):
        np.random.seed(3975)
        x_e = stats.expon.rvs(size=5000)
        d_ks, p = lilliefors(x_e, dist='exp')
        assert_(p > 0.05)
<commit_msg>lilliefors unit test pvalue bounds<commit_after>from numpy.testing import assert_, assert_raises
from scipy import stats
import nose
from statsmodels.stats._lilliefors import lilliefors
import numpy as np

class TestLilliefors(object):

    def test_normal(self):
        np.random.seed(3975)
        x_n = stats.norm.rvs(size=5000)
        d_ks, p = lilliefors(x_n, dist='norm')
        assert_(p > 0.05)

    def test_expon(self):
        np.random.seed(3975)
        x_e = stats.expon.rvs(size=5000)
        d_ks, p = lilliefors(x_e, dist='exp')
        assert_(p > 0.05)

    def test_pval_bounds(self):
        x = np.arange(1,10)
        d_ks_n, p_n = lilliefors(x, dist='norm')
        d_ks_e, p_e = lilliefors(x, dist='exp')
        assert_(p_n < 1)
        assert_(p_e < 1)

{'fraction_non_alphanumeric': 0.11219147344801796, 'fraction_numerical': 0.03664921465968586, 'mean_word_length': 2.867052023121387, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1358001', 'n_tokens_mistral': 536, 'n_tokens_neox': 499, 'n_words': 106}