mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-04 12:16:53 +00:00
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
This commit is contained in:
parent
bdf3ce9135
commit
92a037684f
2 changed files with 7 additions and 5 deletions
|
|
@ -1,7 +1,8 @@
|
|||
"""Shared fixtures between unit tests"""
|
||||
import pytest
|
||||
"""Shared fixtures between unit tests."""
|
||||
import optparse
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
def options_from(**kwargs):
|
||||
"""Generate a Values instances with our kwargs."""
|
||||
|
|
@ -14,5 +15,5 @@ def options_from(**kwargs):
|
|||
|
||||
@pytest.fixture
|
||||
def default_options():
|
||||
"""Fixture returning the default options of flake8"""
|
||||
"""Fixture returning the default options of flake8."""
|
||||
return options_from()
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
"""Unit tests for the FileChecker class."""
|
||||
import mock
|
||||
import pytest
|
||||
import flake8
|
||||
|
||||
import flake8
|
||||
from flake8 import checker
|
||||
|
||||
|
||||
|
|
@ -48,8 +48,9 @@ def test_nonexistent_file():
|
|||
|
||||
|
||||
def test_raises_exception_on_failed_plugin(tmp_path, default_options):
|
||||
"""Checks that a failing plugin results in PluginExecutionFailed."""
|
||||
foobar = tmp_path / 'foobar.py'
|
||||
foobar.write_text("I exist")
|
||||
foobar.write_text(u"I exist!") # Create temp file
|
||||
plugin = {
|
||||
"name": "failure",
|
||||
"plugin_name": "failure", # Both are necessary
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue