flake8/tests/unit/conftest.py
Tomer Keren 92a037684f Fix python2 unicode test error
I guess that if you don't have something python2 compliant to say. might as well say nothing at all
Also fix linter errors
2019-01-30 08:55:57 -08:00

19 lines
501 B
Python

"""Shared fixtures between unit tests."""
import optparse
import pytest
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()