<commit_before>#!/usr/bin/env python

import unittest
import glob
import pygtk
pygtk.require('2.0')

test_loader = unittest.defaultTestLoader

names = []
for filename in glob.iglob("test_*.py"):
    names.append(filename[:-3])

test_suites = []
for name in names:
    test_suites.append(test_loader.loadTestsFromName(name))

runner = unittest.TextTestRunner(verbosity=2)

for suite in test_suites:
    runner.run(suite)
<commit_msg>tests: Command line arguments can be passed to testrunner<commit_after>#!/usr/bin/env python

import unittest
import glob
import pygtk
pygtk.require('2.0')
import sys

test_loader = unittest.defaultTestLoader

names = []
args = sys.argv[1:]

if args:
    for item in args:
        names.append(item[:-3])
else:
    for filename in glob.iglob("test_*.py"):
        names.append(filename[:-3])

test_suites = []
for name in names:
    test_suites.append(test_loader.loadTestsFromName(name))

runner = unittest.TextTestRunner(verbosity=2)

for suite in test_suites:
    runner.run(suite)

{'fraction_non_alphanumeric': 0.119960668633235, 'fraction_numerical': 0.00983284169124877, 'mean_word_length': 4.593406593406593, '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': '1653182', 'n_tokens_mistral': 357, 'n_tokens_neox': 349, 'n_words': 80}