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

"""
test_create_template
--------------------
"""


import os
import pytest
import subprocess

from cookiecutter.main import cookiecutter

TEMPLATE = os.path.realpath('.')


@pytest.fixture
def output_dir(tmpdir):
    return str(tmpdir.mkdir('output'))


def run_tox(plugin):
    """Run the tox suite of the newly created plugin."""
    try:
        subprocess.check_call([
            'tox',
            plugin,
            '-c', os.path.join(plugin, 'tox.ini'),
            '-e', 'py'
        ])
    except subprocess.CalledProcessError as e:
        pytest.fail(e)


def test_run_cookiecutter_and_plugin_tests(cookies):
    """Create a new plugin via cookiecutter and run its tests."""
    result = cookies.bake()

    assert result.project.basename == 'pytest-foobar'
    assert result.project.isdir()

    run_tox(str(result.project))<commit_msg>Remove unused cookiecutter code<commit_after># -*- coding: utf-8 -*-

"""
test_create_template
--------------------
"""


import os
import pytest
import subprocess


@pytest.fixture
def output_dir(tmpdir):
    return str(tmpdir.mkdir('output'))


def run_tox(plugin):
    """Run the tox suite of the newly created plugin."""
    try:
        subprocess.check_call([
            'tox',
            plugin,
            '-c', os.path.join(plugin, 'tox.ini'),
            '-e', 'py'
        ])
    except subprocess.CalledProcessError as e:
        pytest.fail(e)


def test_run_cookiecutter_and_plugin_tests(cookies):
    """Create a new plugin via cookiecutter and run its tests."""
    result = cookies.bake()

    assert result.project.basename == 'pytest-foobar'
    assert result.project.isdir()

    run_tox(str(result.project))
{'fraction_non_alphanumeric': 0.14924506387921022, 'fraction_numerical': 0.0011614401858304297, 'mean_word_length': 2.6121593291404612, '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': '6620428', 'n_tokens_mistral': 554, 'n_tokens_neox': 538, 'n_words': 128}