← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1431265] [NEW] tools/check_uuid.py works incorect for tests with decorators

 

Public bug reported:

There is a patch 
https://review.openstack.org/#/c/153234/

It contains new tests as well as DDT lib enabling. In case of DDT test
uses decorators. In that case tools/check_uuid.py does not check test
ids correctly. I see following

tox -v -epep8
using tox.ini: /home/ymorkovn/tempest/tox.ini
using tox-1.9.0 from /usr/local/lib/python2.7/dist-packages/tox/__init__.pyc
pep8 reusing: /home/ymorkovn/tempest/.tox/pep8
  /home/ymorkovn/tempest$ /home/ymorkovn/tempest/.tox/pep8/bin/python /home/ymorkovn/tempest/setup.py --name
pep8 develop-inst-noop: /home/ymorkovn/tempest
pep8 runtests: PYTHONHASHSEED='378892151'
pep8 runtests: commands[0] | flake8
  /home/ymorkovn/tempest$ /home/ymorkovn/tempest/.tox/pep8/bin/flake8
pep8 runtests: commands[1] | /home/ymorkovn/tempest/tools/config/check_uptodate.sh
  /home/ymorkovn/tempest$ /home/ymorkovn/tempest/tools/config/check_uptodate.sh
pep8 runtests: commands[2] | python tools/check_uuid.py
  /home/ymorkovn/tempest$ /home/ymorkovn/tempest/.tox/pep8/bin/python tools/check_uuid.py
2015-03-12 10:18:23.199 31877 CRITICAL tempest [-] AttributeError: 'Name' object has no attribute 'attr'
2015-03-12 10:18:23.199 31877 TRACE tempest Traceback (most recent call last):
2015-03-12 10:18:23.199 31877 TRACE tempest   File "tools/check_uuid.py", line 354, in <module>
2015-03-12 10:18:23.199 31877 TRACE tempest     run()
2015-03-12 10:18:23.199 31877 TRACE tempest   File "tools/check_uuid.py", line 342, in run
2015-03-12 10:18:23.199 31877 TRACE tempest     untagged = checker.find_untagged(tests)
2015-03-12 10:18:23.199 31877 TRACE tempest   File "tools/check_uuid.py", line 260, in find_untagged
2015-03-12 10:18:23.199 31877 TRACE tempest     return self._filter_tests(check_uuid_in_meta, tests)
2015-03-12 10:18:23.199 31877 TRACE tempest   File "tools/check_uuid.py", line 242, in _filter_tests
2015-03-12 10:18:23.199 31877 TRACE tempest     if function(module_name, test_name, tests):
2015-03-12 10:18:23.199 31877 TRACE tempest   File "tools/check_uuid.py", line 258, in check_uuid_in_meta
2015-03-12 10:18:23.199 31877 TRACE tempest     tests[module_name]['tests'][test_name])
2015-03-12 10:18:23.199 31877 TRACE tempest   File "tools/check_uuid.py", line 122, in _get_idempotent_id
2015-03-12 10:18:23.199 31877 TRACE tempest     decorator.func.attr == DECORATOR_NAME and
2015-03-12 10:18:23.199 31877 TRACE tempest AttributeError: 'Name' object has no attribute 'attr'
2015-03-12 10:18:23.199 31877 TRACE tempest
ERROR: InvocationError: '/home/ymorkovn/tempest/.tox/pep8/bin/python tools/check_uuid.py'

** Affects: neutron
     Importance: Undecided
         Status: Invalid

** Changed in: neutron
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1431265

Title:
  tools/check_uuid.py works incorect for tests with decorators

Status in OpenStack Neutron (virtual network service):
  Invalid

Bug description:
  There is a patch 
  https://review.openstack.org/#/c/153234/

  It contains new tests as well as DDT lib enabling. In case of DDT test
  uses decorators. In that case tools/check_uuid.py does not check test
  ids correctly. I see following

  tox -v -epep8
  using tox.ini: /home/ymorkovn/tempest/tox.ini
  using tox-1.9.0 from /usr/local/lib/python2.7/dist-packages/tox/__init__.pyc
  pep8 reusing: /home/ymorkovn/tempest/.tox/pep8
    /home/ymorkovn/tempest$ /home/ymorkovn/tempest/.tox/pep8/bin/python /home/ymorkovn/tempest/setup.py --name
  pep8 develop-inst-noop: /home/ymorkovn/tempest
  pep8 runtests: PYTHONHASHSEED='378892151'
  pep8 runtests: commands[0] | flake8
    /home/ymorkovn/tempest$ /home/ymorkovn/tempest/.tox/pep8/bin/flake8
  pep8 runtests: commands[1] | /home/ymorkovn/tempest/tools/config/check_uptodate.sh
    /home/ymorkovn/tempest$ /home/ymorkovn/tempest/tools/config/check_uptodate.sh
  pep8 runtests: commands[2] | python tools/check_uuid.py
    /home/ymorkovn/tempest$ /home/ymorkovn/tempest/.tox/pep8/bin/python tools/check_uuid.py
  2015-03-12 10:18:23.199 31877 CRITICAL tempest [-] AttributeError: 'Name' object has no attribute 'attr'
  2015-03-12 10:18:23.199 31877 TRACE tempest Traceback (most recent call last):
  2015-03-12 10:18:23.199 31877 TRACE tempest   File "tools/check_uuid.py", line 354, in <module>
  2015-03-12 10:18:23.199 31877 TRACE tempest     run()
  2015-03-12 10:18:23.199 31877 TRACE tempest   File "tools/check_uuid.py", line 342, in run
  2015-03-12 10:18:23.199 31877 TRACE tempest     untagged = checker.find_untagged(tests)
  2015-03-12 10:18:23.199 31877 TRACE tempest   File "tools/check_uuid.py", line 260, in find_untagged
  2015-03-12 10:18:23.199 31877 TRACE tempest     return self._filter_tests(check_uuid_in_meta, tests)
  2015-03-12 10:18:23.199 31877 TRACE tempest   File "tools/check_uuid.py", line 242, in _filter_tests
  2015-03-12 10:18:23.199 31877 TRACE tempest     if function(module_name, test_name, tests):
  2015-03-12 10:18:23.199 31877 TRACE tempest   File "tools/check_uuid.py", line 258, in check_uuid_in_meta
  2015-03-12 10:18:23.199 31877 TRACE tempest     tests[module_name]['tests'][test_name])
  2015-03-12 10:18:23.199 31877 TRACE tempest   File "tools/check_uuid.py", line 122, in _get_idempotent_id
  2015-03-12 10:18:23.199 31877 TRACE tempest     decorator.func.attr == DECORATOR_NAME and
  2015-03-12 10:18:23.199 31877 TRACE tempest AttributeError: 'Name' object has no attribute 'attr'
  2015-03-12 10:18:23.199 31877 TRACE tempest
  ERROR: InvocationError: '/home/ymorkovn/tempest/.tox/pep8/bin/python tools/check_uuid.py'

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


Follow ups

References