<commit_before>import unittest

import os.path
import os
import sys


def run_tests():
    testfolder = os.path.abspath(os.path.split(__file__)[0])
    print testfolder

    sys.path.append(testfolder)


    for root, dirs, files in os.walk(testfolder):
        test_modules = [
            file.replace('.py', '') for file in files if
                file.startswith('test_') and
                file.endswith('.py')]

        for mod in test_modules:
            #globals().update(__import__(mod, globals(), locals()).__dict__)
            # import it
            imported_mod = __import__(mod, globals(), locals())
            #print imported_mod.__dict__
            globals().update(imported_mod.__dict__)


    unittest.main()

if __name__ == '__main__':
    run_tests()<commit_msg>Made running tests more verbose<commit_after>import unittest

import os.path
import os
import sys


def run_tests():
    testfolder = os.path.abspath(os.path.split(__file__)[0])
    print testfolder

    sys.path.append(testfolder)


    for root, dirs, files in os.walk(testfolder):
        test_modules = [
            file.replace('.py', '') for file in files if
                file.startswith('test_') and
                file.endswith('.py')]

        for mod in test_modules:
            #globals().update(__import__(mod, globals(), locals()).__dict__)
            # import it
            imported_mod = __import__(mod, globals(), locals())
            #print imported_mod.__dict__
            globals().update(imported_mod.__dict__)


    runner = unittest.TextTestRunner(verbosity = 2)
    unittest.main(testRunner = runner)

if __name__ == '__main__':
    run_tests()
{'fraction_non_alphanumeric': 0.11771771771771772, 'fraction_numerical': 0.0018018018018018018, 'mean_word_length': 2.478079331941545, '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': '4308070', 'n_tokens_mistral': 507, 'n_tokens_neox': 485, 'n_words': 111}