<commit_before>#!/usr/bin/env python
"""
    runtests
    ~~~~~~~~
    
    Runs all unittests.
    
    :copyright: 2009 by <NAME>, <NAME>.
    :license: MIT, see LICENSE.txt for details.
"""

TESTS = ['form', 'fields', 'validators']


from unittest import defaultTestLoader, TextTestRunner, TestSuite
import sys

suite = TestSuite()
suite.addTest(defaultTestLoader.loadTestsFromNames(TESTS))

runner = TextTestRunner(verbosity=(sys.argv.count('-v') + 1))
runner.run(suite)
<commit_msg>`runtests.py` now gives a proper exit code<commit_after>#!/usr/bin/env python
"""
    runtests
    ~~~~~~~~
    
    Runs all unittests.
    
    :copyright: 2009 by <NAME>, <NAME>.
    :license: MIT, see LICENSE.txt for details.
"""

TESTS = ['form', 'fields', 'validators']


from unittest import defaultTestLoader, TextTestRunner, TestSuite
import sys

suite = TestSuite()
suite.addTest(defaultTestLoader.loadTestsFromNames(TESTS))

runner = TextTestRunner(verbosity=(sys.argv.count('-v') - sys.argv.count('-q') + 1))
result = runner.run(suite)
sys.exit(not result.wasSuccessful())

{'fraction_non_alphanumeric': 0.15671641791044777, 'fraction_numerical': 0.009328358208955223, 'mean_word_length': 4.311881188118812, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2801925', 'n_tokens_mistral': 364, 'n_tokens_neox': 351, 'n_words': 82}