<commit_before>import argparse
import logging
import sys
import unittest


parser = argparse.ArgumentParser(
    description="Generates C code to perform tests specified by a YAML file",
)
parser.add_argument('--test', '-t', action='store_true',
                    help="Run the test suite")
parser.add_argument('--verbose', '-v', action='count', default=0)


args = parser.parse_args()
if args.verbose:
    logging.basicConfig(level=logging.INFO)
else:
    logging.basicConfig()

if args.test:
    from . import tests
    tests = unittest.defaultTestLoader.loadTestsFromModule(tests)
    unittest.TextTestRunner(verbosity=args.verbose+1).run(tests)<commit_msg>Added support for specifying the test case<commit_after>import argparse
import logging
import sys
import unittest


parser = argparse.ArgumentParser(
    description="Generates C code to perform tests specified by a YAML file",
)
parser.add_argument('--test', '-t', action='store', nargs='?',
                    const=True, default=False,
                    help="Run the test suite")
parser.add_argument('--verbose', '-v', action='count', default=0)


args = parser.parse_args()
if args.verbose:
    logging.basicConfig(level=logging.INFO)
else:
    logging.basicConfig()

if args.test:
    from . import tests
    if args.test is not True:
        tests = unittest.defaultTestLoader.loadTestsFromName(args.test, tests)
    else:
        tests = unittest.defaultTestLoader.loadTestsFromModule(tests)

    unittest.TextTestRunner(verbosity=args.verbose+1).run(tests)
{'fraction_non_alphanumeric': 0.11568627450980393, 'fraction_numerical': 0.00261437908496732, 'mean_word_length': 3.986970684039088, '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': '7446246', 'n_tokens_mistral': 451, 'n_tokens_neox': 438, 'n_words': 111}