<commit_before>#!/usr/bin/python

"""Loop over running a set of test scripts in a directory.

Made for use within NrvrCommander.

Idea and first implementation - <NAME> <srguiwiz12 AT nrvr DOT com>

Public repository - https://github.com/srguiwiz/nrvr-commander

Copyright (c) Nirvana Research 2006-2014.
Modified BSD License"""

import glob
import os
import os.path
import sys
import time

numberOfIterations = 3
secondsBetweenTests = 5
secondsBetweenIterations = 15

scriptDirectory = os.path.dirname(os.path.abspath(__file__))
testsDirectory = os.path.join(scriptDirectory, "tests")
testsGlob = os.path.join(testsDirectory, "*.py")

tests = glob.glob(testsGlob)
tests.sort()

def stdFlush():
    sys.stdout.flush()
    sys.stderr.flush()

print "STARTING running %s" % (__file__)
print "STARTING running %d iterations of tests in %s" % (numberOfIterations, testsDirectory)
stdFlush()
for iteration in range(0, numberOfIterations):
    for test in tests:
        print "STARTING iteration #%d of %s" % (iteration, test)
        stdFlush()
        try:
            os.system(test)
            stdFlush()
            print "NORMALLY completed iteration #%d of %s" % (iteration, test)
            stdFlush()
        except Exception as ex:
            stdFlush()
            print "EXCEPTION out of iteration #%d of %s:" % (iteration, test)
            print ex<commit_msg>Run test scripts having or not having #!<commit_after>#!/usr/bin/python

"""Loop over running a set of test scripts in a directory.

Made for use within NrvrCommander.

Idea and first implementation - <NAME> <srguiwiz12 AT nrvr DOT com>

Public repository - https://github.com/srguiwiz/nrvr-commander

Copyright (c) Nirvana Research 2006-2014.
Modified BSD License"""

import glob
import os
import os.path
import sys
import time

numberOfIterations = 3
secondsBetweenTests = 5
secondsBetweenIterations = 15

scriptDirectory = os.path.dirname(os.path.abspath(__file__))
testsDirectory = os.path.join(scriptDirectory, "tests")
testsGlob = os.path.join(testsDirectory, "*.py")

tests = glob.glob(testsGlob)
tests.sort()

def stdFlush():
    sys.stdout.flush()
    sys.stderr.flush()

print "STARTING running %s" % (__file__)
print "STARTING running %d iterations of tests in %s" % (numberOfIterations, testsDirectory)
stdFlush()
for iteration in range(0, numberOfIterations):
    for test in tests:
        print "STARTING iteration #%d of %s" % (iteration, test)
        stdFlush()
        try:
            os.system("python " + test)
            stdFlush()
            print "NORMALLY completed iteration #%d of %s" % (iteration, test)
            stdFlush()
        except Exception as ex:
            stdFlush()
            print "EXCEPTION out of iteration #%d of %s:" % (iteration, test)
            print ex
{'fraction_non_alphanumeric': 0.10528206970894718, 'fraction_numerical': 0.010779734099892203, 'mean_word_length': 3.302936630602782, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '1677500', 'n_tokens_mistral': 899, 'n_tokens_neox': 855, 'n_words': 275}