<commit_before>import os
import glob
import re
import unittest
import xmlrunner


if __name__ == '__main__':
    testLocation = os.getcwd()
    testPath = os.path.abspath(testLocation)
    testScripts = glob.glob('{0}/test_*.py'.format(testLocation))
    scriptToModuleName = lambda f: os.path.splitext(os.path.basename(f))[0]
    moduleNames = map(scriptToModuleName, testScripts)
    modules = map(__import__, moduleNames)
    load = unittest.defaultTestLoader.loadTestsFromModule

    suite = unittest.TestSuite(map(load, modules))
    i = 0
    for uTest in suite._tests:
        print 'Running test: %s' %testScripts[i]
        with open(os.path.join(testLocation, 'test-reports', '{0}.xml'.format(uTest._tests[0]._tests[0].__module__)), 'w') as resultsLog:
            xmlrunner.XMLTestRunner(resultsLog).run(uTest)<commit_msg>created test-reports folder<commit_after>import os
import glob
import re
import unittest
import xmlrunner


if __name__ == '__main__':
    testLocation = os.getcwd()
    os.mkdir(os.path.join(testLocation, 'test-reports'))
    testPath = os.path.abspath(testLocation)
    testScripts = glob.glob('{0}/test_*.py'.format(testLocation))
    scriptToModuleName = lambda f: os.path.splitext(os.path.basename(f))[0]
    moduleNames = map(scriptToModuleName, testScripts)
    modules = map(__import__, moduleNames)
    load = unittest.defaultTestLoader.loadTestsFromModule

    suite = unittest.TestSuite(map(load, modules))
    i = 0
    for uTest in suite._tests:
        print 'Running test: %s' %testScripts[i]
        with open(os.path.join(testLocation, 'test-reports', '{0}.xml'.format(uTest._tests[0]._tests[0].__module__)), 'w') as resultsLog:
            xmlrunner.XMLTestRunner(resultsLog).run(uTest)
{'fraction_non_alphanumeric': 0.13010938399539435, 'fraction_numerical': 0.0069084628670120895, 'mean_word_length': 4.266666666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '966118', 'n_tokens_mistral': 580, 'n_tokens_neox': 567, 'n_words': 109}