[tests] pylint E041 failures for ddt and mock

Bug #1813156 reported by Tom Barron
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Medium
Tom Barron

Bug Description

When a git commit includes changes to manila test code it typically has E401 failures claiming
that ddt and mock cannot be imported. For example:

2019-01-23 19:20:57.403442 | ubuntu-xenial | Running pylint against:
2019-01-23 19:20:57.403635 | ubuntu-xenial | manila/manager.py
2019-01-23 19:20:57.403703 | ubuntu-xenial | manila/service.py
2019-01-23 19:20:57.403773 | ubuntu-xenial | manila/share/driver.py
2019-01-23 19:20:57.403874 | ubuntu-xenial | manila/share/drivers/service_instance.py
2019-01-23 19:20:57.403943 | ubuntu-xenial | manila/share/manager.py
2019-01-23 19:20:57.404062 | ubuntu-xenial | manila/tests/share/drivers/test_service_instance.py
2019-01-23 19:20:57.404152 | ubuntu-xenial | manila/tests/share/test_manager.py
...
2019-01-23 19:21:15.383441 | ubuntu-xenial | manila/tests/share/drivers/test_service_instance.py:22:0: E0401: Unable to import 'ddt' (import-error)
2019-01-23 19:21:15.383699 | ubuntu-xenial | manila/tests/share/drivers/test_service_instance.py:23:0: E0401: Unable to import 'mock' (import-error)

Although warnings that modules cannot be imported are valuable, these are spurious. We know that they can and are imported and used by our test code.

Tags: tests
Tom Barron (tpb)
tags: added: tests
Tom Barron (tpb)
Changed in manila:
milestone: none → stein-3
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

Fix proposed to branch: master
Review: https://review.openstack.org/632992

Changed in manila:
assignee: nobody → Tom Barron (tpb)
status: New → In Progress
Changed in manila:
importance: Low → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/632992
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=1838d519257aaa7127b71ff93be7e49946673025
Submitter: Zuul
Branch: master

commit 1838d519257aaa7127b71ff93be7e49946673025
Author: Tom Barron <email address hidden>
Date: Thu Jan 24 07:38:45 2019 -0500

    Fix spurious pylint import errors for ddt and mock

    Set dependencies correctly for pylint job in tox.ini so
    it does not report spurious E041 import errors on mock
    and ddt modules. Also fix a reference to Cinder instead
    of Manila in the pylint script.

    Closes-Bug: #1813156
    Change-Id: Ib160caae57e41a4d45483ff4faa599143e694abc

Changed in manila:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 8.0.0.0rc1

This issue was fixed in the openstack/manila 8.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.