mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-05 04:36:52 +00:00
Update mock.patch to use pycodestyle as well
This commit is contained in:
parent
2cfc2777c1
commit
eac3fcfc42
4 changed files with 7 additions and 7 deletions
|
|
@ -48,7 +48,7 @@ class TestEngine(unittest.TestCase):
|
|||
StyleGuide.assert_called_once_with(**{'parser': m, 'foo': 'bar'})
|
||||
|
||||
def test_register_extensions(self):
|
||||
with mock.patch('pep8.register_check') as register_check:
|
||||
with mock.patch('pycodestyle.register_check') as register_check:
|
||||
registered_exts = engine._register_extensions()
|
||||
self.assertTrue(isinstance(registered_exts[0], util.OrderedSet))
|
||||
self.assertTrue(len(registered_exts[0]) > 0)
|
||||
|
|
@ -72,7 +72,7 @@ class TestEngine(unittest.TestCase):
|
|||
# setup
|
||||
re = self.start_patch('flake8.engine._register_extensions')
|
||||
gpv = self.start_patch('flake8.engine.get_python_version')
|
||||
pgp = self.start_patch('pep8.get_parser')
|
||||
pgp = self.start_patch('pycodestyle.get_parser')
|
||||
m = mock.Mock()
|
||||
re.return_value = ([('pyflakes', '0.7'), ('mccabe', '0.2')], [], [],
|
||||
[])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue