<commit_before>import unittest
import argparse

def unittests():
    test_loader = unittest.TestLoader()
    test_suite = test_loader.discover('tests/unittests', pattern='*_test.py')
    return test_suite

def integrationtests():
    test_loader = unittest.TestLoader()
    test_suite = test_loader.discover('tests/integrationtests', pattern='*_test.py')
    return test_suite

def main():
	parser = argparse.ArgumentParser(description = "tests for checkpy")
	parser.add_argument("-integration", action="store_true", help="run integration tests")
	parser.add_argument("-unit", action="store_true", help="run unittests")
	parser.add_argument("-all", action="store_true", help="run all tests")
	args = parser.parse_args()

	runner = unittest.TextTestRunner(verbosity=1)

	if args.all:
		runner.run(unittests())
		runner.run(integrationtests())
		return

	if args.unit:
		runner.run(unittests())
		return

	if args.integration:
		runner.run(integrationtests())
		return

	parser.print_help()

if __name__ == "__main__":
	main()<commit_msg>run_tests buffers print output<commit_after>import unittest
import argparse

def unittests():
    test_loader = unittest.TestLoader()
    test_suite = test_loader.discover('tests/unittests', pattern='*_test.py')
    return test_suite

def integrationtests():
    test_loader = unittest.TestLoader()
    test_suite = test_loader.discover('tests/integrationtests', pattern='*_test.py')
    return test_suite

def main():
	parser = argparse.ArgumentParser(description = "tests for checkpy")
	parser.add_argument("-integration", action="store_true", help="run integration tests")
	parser.add_argument("-unit", action="store_true", help="run unittests")
	parser.add_argument("-all", action="store_true", help="run all tests")
	args = parser.parse_args()

	runner = unittest.TextTestRunner(verbosity=1, buffer=True)

	if args.all:
		runner.run(unittests())
		runner.run(integrationtests())
		return

	if args.unit:
		runner.run(unittests())
		return

	if args.integration:
		runner.run(integrationtests())
		return

	parser.print_help()

if __name__ == "__main__":
	main()
{'fraction_non_alphanumeric': 0.13415794481446242, 'fraction_numerical': 0.0009514747859181732, 'mean_word_length': 5.634069400630914, 'pattern_counts': {'":': 2, '<': 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': '3042451', 'n_tokens_mistral': 692, 'n_tokens_neox': 665, 'n_words': 133}