<commit_before>from pymc import tests
import unittest
import warnings
import os

# Changeset
# 19/03/2007 -DH- The modules in tests/ are now imported when test is called. 
# June 17, 2008 -DH- Switched to unittests since NumpyTest made way to nose framework.

warnings.simplefilter('ignore', FutureWarning)

__all__=['test']
def test():
    try:
        os.mkdir('test_results')
    except:
        pass
    os.chdir('test_results')
    
    # Import all tests modules declared in pymc/tests/__init__.py
    __import__('pymc.tests', fromlist=tests.__modules__)
    
    # Create a test suite from all the tests
    L = unittest.TestLoader()
    S = L.loadTestsFromNames(tests.__modules__, tests)
    
    # Run the test suite.
    unittest.TextTestRunner(verbosity=1).run(S)
    os.chdir('..')

if __name__=='__main__':
    test()
    
    <commit_msg>testsuite now uses nose framework.<commit_after>from pymc import tests
import unittest
import warnings
import os

# Changeset
# 19/03/2007 -DH- The modules in tests/ are now imported when test is called. 
# June 17, 2008 -DH- Switched to unittests since NumpyTest made way to nose framework.
# Sept 15, 2008 Switching to nose to run the test suite. 
warnings.simplefilter('ignore', FutureWarning)

__all__=['test']
def test():
    import nose
    
    try:
        os.mkdir('test_results')
    except:
        pass
    os.chdir('test_results')
    
    nose.main()
    
    os.chdir('..')

if __name__=='__main__':
    import nose
    nose.main()
    
    
{'fraction_non_alphanumeric': 0.10079575596816977, 'fraction_numerical': 0.023209549071618037, 'mean_word_length': 2.9815303430079156, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4847220', 'n_tokens_mistral': 518, 'n_tokens_neox': 479, 'n_words': 151}