From bdf3ce9135804e966df18423326b2a0be9b8ee3e Mon Sep 17 00:00:00 2001 From: Tomer Keren Date: Sun, 13 Jan 2019 21:41:10 +0200 Subject: [PATCH] Fix dogfood --- tests/unit/conftest.py | 3 ++- tests/unit/test_file_checker.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py index 5b8daa3..d29c0cd 100644 --- a/tests/unit/conftest.py +++ b/tests/unit/conftest.py @@ -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() - \ No newline at end of file diff --git a/tests/unit/test_file_checker.py b/tests/unit/test_file_checker.py index 9e9bd03..3d0992e 100644 --- a/tests/unit/test_file_checker.py +++ b/tests/unit/test_file_checker.py @@ -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 = {