<commit_before>from . import integration
import os
import pytest
import tempfile
import subprocess


def test_kcm_init():
    args = ["init",
            "--conf-dir={}".format(os.path.join(tempfile.mkdtemp(), "init"))]
    with pytest.raises(subprocess.CalledProcessError):
        integration.execute(integration.kcm(), args)<commit_msg>Skip test if in CI environment with too few physical cores<commit_after>from . import integration
from intel import init
import os
import pytest
import tempfile


@pytest.mark.skipif(len(init.discover_topo()) < 6,
                    reason="requires at least 6 physical cores to pass")
def test_kcm_init():
    args = ["init",
            "--conf-dir={}".format(os.path.join(tempfile.mkdtemp(), "init"))]

    integration.execute(integration.kcm(), args)
{'fraction_non_alphanumeric': 0.12846347607052896, 'fraction_numerical': 0.0025188916876574307, 'mean_word_length': 3.847560975609756, 'pattern_counts': {'":': 0, '<': 4, '<?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': '4720327', 'n_tokens_mistral': 246, 'n_tokens_neox': 237, 'n_words': 61}