<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

try:
    import nose
except ImportError:
    message = """nose package not installed, install test requirements with:

    pip install -r requirements-test.txt
    """
    raise ImportError(message)

if __name__ == "__main__":
    nose.run()<commit_msg>Made runtests.py exit with 1 if tests fail<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

try:
    import nose
except ImportError:
    message = """nose package not installed, install test requirements with:

    pip install -r requirements-test.txt
    """
    raise ImportError(message)

if __name__ == "__main__":
    result = nose.run()
    if result is False:
        import sys
        sys.exit(1)
{'fraction_non_alphanumeric': 0.12038303693570451, 'fraction_numerical': 0.005471956224350205, 'mean_word_length': 3.0, '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': '6044205', 'n_tokens_mistral': 224, 'n_tokens_neox': 217, 'n_words': 70}