

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))



import os
import pytest
import subprocess


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))

Remove output_dir fixture from test
Remove output_dir fixture from test

  
  
  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))
  
Remove output_dir fixture from test
## Code Before:


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))

## Instruction:
Remove output_dir fixture from test
## Code After:


import os
import pytest
import subprocess


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))
