mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-31 11:16:54 +00:00
Fix dogfood
This commit is contained in:
parent
b64421c5e8
commit
bdf3ce9135
2 changed files with 3 additions and 2 deletions
|
|
@ -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()
|
||||
|
||||
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue