← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1229342] Re: The output of "run_tests.sh -p" is hard to understand when H803 error

 

** Changed in: horizon
       Status: Fix Committed => Fix Released

** Changed in: horizon
    Milestone: None => havana-rc1

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1229342

Title:
  The output of "run_tests.sh -p" is hard to understand when H803 error

Status in OpenStack Dashboard (Horizon):
  Fix Released

Bug description:
  When there is an error H803  (git commit title should not end with
  period), the output of "run_tests.sh -p" is difficult to understand.

  ubuntu@ostack02:~/horizon (bug/1226868)$ ./run_tests.sh -p
  Checking environment.
  Environment is up to date.
  Running flake8 ...
  Traceback (most recent call last):
    File "/opt/stack/horizon/.venv/bin/flake8", line 9, in <module>
      load_entry_point('flake8==2.0', 'console_scripts', 'flake8')()
    File "/opt/stack/horizon/.venv/local/lib/python2.7/site-packages/flake8/main.py", line 29, in main
      report = flake8_style.check_files()
    File "/opt/stack/horizon/.venv/local/lib/python2.7/site-packages/pep8.py", line 1604, in check_files
      self.input_dir(path)
    File "/opt/stack/horizon/.venv/local/lib/python2.7/site-packages/pep8.py", line 1640, in input_dir
      runner(os.path.join(root, filename))
    File "/opt/stack/horizon/.venv/local/lib/python2.7/site-packages/flake8/engine.py", line 69, in input_file
      return fchecker.check_all(expected=expected, line_offset=line_offset)
    File "/opt/stack/horizon/.venv/local/lib/python2.7/site-packages/pep8.py", line 1348, in check_all
      self.check_ast()
    File "/opt/stack/horizon/.venv/local/lib/python2.7/site-packages/pep8.py", line 1329, in check_ast
      if not noqa(self.lines[lineno - 1]):
  IndexError: list index out of range

  After removing $included_dirs from flake8 arguments, a user-friendly message is printed.
  We can exclude files by tox.ini, so $included_dirs is not necessarily required.

  ubuntu@ostack02:~/horizon (bug/1226868)$ source .venv/bin/activate
  (.venv)ubuntu@ostack02:~/horizon (bug/1226868)$ DJANGO_SETTINGS_MODULE=openstack_dashboard.test.settings flake8
  ./manage.py:1:1: H803  git commit title ('Add support for loadbalancer providers.') should not end with period

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1229342/+subscriptions