<commit_before># -*- coding: utf-8 -*-

"""Miscellaneous tests about code quality"""

import subprocess

MAX_MCCABE_COMPLEXITY = 10


def test_mccabe():
    # TODO Test remove test case? (Now performed with tox tests)
    cmd = 'flake8 --max-complexity=%d purkinje' % MAX_MCCABE_COMPLEXITY
    result = subprocess.call(cmd.split())
    assert result == 0, 'McCabe check seems to have failed'
<commit_msg>Marked McCabe test case as slow (currently 0.5 s)<commit_after># -*- coding: utf-8 -*-

"""Miscellaneous tests about code quality"""

import subprocess
import pytest

MAX_MCCABE_COMPLEXITY = 10


@pytest.mark.slow
def test_mccabe():
    # TODO Test remove test case? (Now performed with tox tests)
    cmd = 'flake8 --max-complexity=%d purkinje' % MAX_MCCABE_COMPLEXITY
    result = subprocess.call(cmd.split())
    assert result == 0, 'McCabe check seems to have failed'

{'fraction_non_alphanumeric': 0.1141552511415525, 'fraction_numerical': 0.0136986301369863, 'mean_word_length': 4.069364161849711, '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': '4119549', 'n_tokens_mistral': 310, 'n_tokens_neox': 293, 'n_words': 91}