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

import sys
from types import ModuleType
from os.path import abspath, dirname
from subprocess import Popen, STDOUT


def importable(module):
    try:
        m = __import__(module, globals(), locals())
        return type(m) is ModuleType
    except ImportError:
        return False


def runtests():
    cmd = ["py.test", "-r", "fsxX", "--ignore=tmp"]

    if importable("pytest_cov"):
        cmd.append("--cov=circuits")
        cmd.append("--cov-report=html")

    cmd.append(dirname(abspath(__file__)))

    raise SystemExit(Popen(cmd, stdout=sys.stdout, stderr=STDOUT).wait())

if __name__ == "__main__":
    runtests()<commit_msg>Fixed running test suite from python setup.py test<commit_after>#!/usr/bin/env python

import sys
from types import ModuleType
from os.path import abspath, dirname
from subprocess import Popen, STDOUT


def importable(module):
    try:
        m = __import__(module, globals(), locals())
        return type(m) is ModuleType
    except ImportError:
        return False


def main():
    cmd = ["py.test", "-r", "fsxX", "--ignore=tmp"]

    if importable("pytest_cov"):
        cmd.append("--cov=circuits")
        cmd.append("--cov-report=html")

    cmd.append(dirname(abspath(__file__)))

    raise SystemExit(Popen(cmd, stdout=sys.stdout, stderr=STDOUT).wait())

if __name__ == "__main__":
    main()
{'fraction_non_alphanumeric': 0.1414068165337201, 'fraction_numerical': 0.0, 'mean_word_length': 3.466019417475728, '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': '4758574', 'n_tokens_mistral': 456, 'n_tokens_neox': 446, 'n_words': 112}