Update mock.patch to use pycodestyle as well

This commit is contained in:
Ian Cordasco 2016-06-15 13:39:38 -05:00
parent 2cfc2777c1
commit eac3fcfc42
No known key found for this signature in database
GPG key ID: 656D3395E4A9791A
4 changed files with 7 additions and 7 deletions

View file

@ -1,7 +1,7 @@
CHANGES
=======
2.6.0 - 2016-06-xx
2.6.0 - 2016-06-15
------------------
- **Requirements Change** Switch to pycodestyle as all future pep8 releases
@ -10,7 +10,7 @@ CHANGES
- **Improvement** Allow for Windows users on *select* versions of Python to
use ``--jobs`` and multiprocessing
- **Improvement** Update bounds on McCabe (todo)
- **Improvement** Update bounds on McCabe
- **Improvement** Update bounds on PyFlakes and blacklist known broken
versions

View file

@ -280,7 +280,7 @@ class IntegrationTestCaseWarnings(unittest.TestCase):
with open(self.this_file(), "r") as f:
return f.read()
with mock.patch("pep8.stdin_get_value", fake_stdin):
with mock.patch("pycodestyle.stdin_get_value", fake_stdin):
(style_guide,
report,
collected_warnings,

View file

@ -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')], [], [],
[])

View file

@ -64,7 +64,7 @@ class IntegrationTestCase(unittest.TestCase):
with open(self.this_file(), "r") as f:
return f.read()
with mock.patch("pep8.stdin_get_value", fake_stdin):
with mock.patch("pycodestyle.stdin_get_value", fake_stdin):
guide, report = self.check_files(arglist=['--jobs=4'],
explicit_stdin=True)
self.assertEqual(self.count, 1)
@ -72,7 +72,7 @@ class IntegrationTestCase(unittest.TestCase):
def test_stdin_fail(self):
def fake_stdin():
return "notathing\n"
with mock.patch("pep8.stdin_get_value", fake_stdin):
with mock.patch("pycodestyle.stdin_get_value", fake_stdin):
# only assert needed is in check_files
guide, report = self.check_files(arglist=['--jobs=4'],
explicit_stdin=True,