mongodb charm unit test has minor lint on import order

Bug #1533654 reported by Ryan Beisner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mongodb (Juju Charms Collection)
Fix Released
Low
Ryan Beisner

Bug Description

The path.append in the log_rotate test may not be necessary, as hooks is imported in other unit_tests without it. But if it is, we need to re-order it to satisfy E402.

Test automation just started surfacing import order lint errors on this file from 2014. Perhaps a flake8 rev, as this charm lints with the bleeding edge of flake8.

http://bazaar.launchpad.net/~charmers/charms/trusty/mongodb/trunk/view/head:/unit_tests/test_write_log_rotate_config.py#L7

00:00:51.533 ${OSCI_ROOT}/tools/make_exec.py Makefile "@flake8" "/flake8" |& tee $WORKSPACE/${test}-test.$BUILD_NUMBER; ret_code=${PIPESTATUS[0]}
00:00:52.046 INFO:root:Workspace dir: /var/lib/jenkins/workspace/charm_lint_check
00:00:52.046 INFO:root:Reading file: Makefile
00:00:52.047 INFO:root:Searching for: ['@flake8', '/flake8']
00:00:52.048 INFO:root:command: make -f Makefile lint
00:00:52.061 .venv/bin/flake8 --exclude hooks/charmhelpers actions actions/dump actions/perf actions/restore hooks tests unit_tests
00:00:52.673 unit_tests/test_write_log_rotate_config.py:7:1: E402 module level import not at top of file
00:00:52.700 make: *** [lint] Error 1
00:00:52.700 ERROR:root:Make target returned non-zero.
00:00:52.731 Returned: 1
00:00:52.731 ! Lint test failed.
00:00:52.736 ====> end lint test <=======================

Tags: uosci

Related branches

Ryan Beisner (1chb1n)
Changed in mongodb (Juju Charms Collection):
assignee: nobody → Ryan Beisner (1chb1n)
importance: Undecided → Low
status: New → Confirmed
status: Confirmed → In Progress
Ryan Beisner (1chb1n)
Changed in mongodb (Juju Charms Collection):
status: In Progress → Fix Committed
Ryan Beisner (1chb1n)
Changed in mongodb (Juju Charms Collection):
status: Fix Committed → Fix Released
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.