summaryrefslogtreecommitdiff
path: root/ironic/tests
diff options
context:
space:
mode:
authorJohn L. Villalovos <openstack.org@sodarock.com>2018-04-10 16:48:00 -0700
committerJim Rollenhagen <jim@jimrollenhagen.com>2018-04-20 09:45:14 -0400
commit9d969c2dc53756fee119d0b4bfc1edaac59bdccc (patch)
tree7c7a82d5ce6df13d0812eb14882040b0bcb2ab50 /ironic/tests
parentb5b26adee515e8b790773f874801291acde7988b (diff)
downloadironic-9d969c2dc53756fee119d0b4bfc1edaac59bdccc.tar.gz
Remove pycodestyle version pin. Add E402 and W503 to ignore.
Rather than pinning pycodestyle, ignore the E402 and W503 error. Fix issue with E731 (Do not assign a lambda expression, use a def). W503 is something we will likely never enable as it is a personal style decision and can change depending on the code. There is no one right answer. Interestingly there is also a W504 which is the opposite check. E402 is one we should most likely fix. But it can be done in a follow patch or patches. List of various error codes: https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes Change-Id: Ie2c31a8a3c75beeef22453cab5878cf0094bdf3f (cherry picked from commit ca91d4d871bae437da2c6173e7a0aad5c3b44532)
Diffstat (limited to 'ironic/tests')
-rw-r--r--ironic/tests/unit/common/test_images.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ironic/tests/unit/common/test_images.py b/ironic/tests/unit/common/test_images.py
index 44975e16e..59c5f3f01 100644
--- a/ironic/tests/unit/common/test_images.py
+++ b/ironic/tests/unit/common/test_images.py
@@ -261,7 +261,8 @@ class FsImageTestCase(base.TestCase):
def test__create_root_fs(self, path_exists_mock,
dirname_mock, mkdir_mock, cp_mock):
- path_exists_mock_func = lambda path: path == 'root_dir'
+ def path_exists_mock_func(path):
+ return path == 'root_dir'
files_info = {
'a1': 'b1',