mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-06 21:16:54 +00:00
parent
79c80c3181
commit
e6cb9528d3
3 changed files with 23 additions and 4 deletions
|
|
@ -6,7 +6,7 @@ try:
|
|||
except ImportError:
|
||||
import mock # < PY33
|
||||
|
||||
from flake8 import engine, util, __version__
|
||||
from flake8 import engine, util, __version__, reporter
|
||||
|
||||
|
||||
class TestEngine(unittest.TestCase):
|
||||
|
|
@ -82,5 +82,17 @@ class TestEngine(unittest.TestCase):
|
|||
# Also we can never be sure (without reconstructing the string
|
||||
# ourselves) what system we may be testing on.
|
||||
|
||||
def test_windows_disables_jobs(self):
|
||||
with mock.patch('flake8.engine.is_windows') as is_windows:
|
||||
is_windows.return_value = True
|
||||
guide = engine.get_style_guide()
|
||||
assert isinstance(guide, reporter.BaseQReport) is False
|
||||
|
||||
def test_stdin_disables_jobs(self):
|
||||
with mock.patch('flake8.engine.is_using_stdin') as is_using_stdin:
|
||||
is_using_stdin.return_value = True
|
||||
guide = engine.get_style_guide()
|
||||
assert isinstance(guide, reporter.BaseQReport) is False
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue