mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-11 07:14:18 +00:00
Write a test checking plugin failure exception handling
This commit is contained in:
parent
c68e7a8d3e
commit
b64421c5e8
2 changed files with 35 additions and 0 deletions
17
tests/unit/conftest.py
Normal file
17
tests/unit/conftest.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
"""Shared fixtures between unit tests"""
|
||||
import pytest
|
||||
import optparse
|
||||
|
||||
def options_from(**kwargs):
|
||||
"""Generate a Values instances with our kwargs."""
|
||||
kwargs.setdefault('hang_closing', True)
|
||||
kwargs.setdefault('max_line_length', 79)
|
||||
kwargs.setdefault('verbose', False)
|
||||
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()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue