Fix dogfood

This commit is contained in:
Tomer Keren 2019-01-13 21:41:10 +02:00 committed by Anthony Sottile
parent b64421c5e8
commit bdf3ce9135
2 changed files with 3 additions and 2 deletions

View file

@ -2,6 +2,7 @@
import pytest
import optparse
def options_from(**kwargs):
"""Generate a Values instances with our kwargs."""
kwargs.setdefault('hang_closing', True)
@ -10,8 +11,8 @@ def options_from(**kwargs):
kwargs.setdefault('stdin_display_name', 'stdin')
return optparse.Values(kwargs)
@pytest.fixture
def default_options():
"""Fixture returning the default options of flake8"""
return options_from()

View file

@ -47,7 +47,7 @@ def test_nonexistent_file():
assert error[0] == "E902"
def test_raises_proper_exception_on_failed_plugin_run(tmp_path, default_options):
def test_raises_exception_on_failed_plugin(tmp_path, default_options):
foobar = tmp_path / 'foobar.py'
foobar.write_text("I exist")
plugin = {