mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-10 06:44:18 +00:00
Merge branch 'fix_linters' into 'master'
fix test which was not testing anything See merge request pycqa/flake8!462
This commit is contained in:
commit
d106c9fb39
1 changed files with 5 additions and 3 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
"""Tests for Flake8's legacy API."""
|
"""Tests for Flake8's legacy API."""
|
||||||
import argparse
|
import argparse
|
||||||
|
import os.path
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
import pytest
|
import pytest
|
||||||
|
|
@ -91,12 +92,13 @@ def test_styleguide_excluded_with_parent():
|
||||||
"""
|
"""
|
||||||
app = mock.Mock()
|
app = mock.Mock()
|
||||||
file_checker_manager = app.file_checker_manager = mock.Mock()
|
file_checker_manager = app.file_checker_manager = mock.Mock()
|
||||||
|
file_checker_manager.is_path_excluded.return_value = False
|
||||||
style_guide = api.StyleGuide(app)
|
style_guide = api.StyleGuide(app)
|
||||||
|
|
||||||
style_guide.excluded('file.py', 'parent')
|
style_guide.excluded('file.py', 'parent')
|
||||||
file_checker_manager.is_path_excluded.call_args == [
|
assert file_checker_manager.is_path_excluded.call_args_list == [
|
||||||
('file.py',),
|
mock.call('file.py'),
|
||||||
('parent/file.py',),
|
mock.call(os.path.join('parent', 'file.py')),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue