__init__.py in tests directory breaks running individual tests

Bug #1152326 reported by Adam Young
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Undecided
Adam Young

Bug Description

[ayoung@ayoung530 keystone (token-cleanup)]$ ./run_tests.sh test_v3_auth
Failure: ImportError (No module named test_v3) ... ERROR

======================================================================
ERROR: Failure: ImportError (No module named test_v3)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/stack/keystone/.venv/lib/python2.7/site-packages/nose/loader.py", line 390, in loadTestsFromName
    addr.filename, addr.module)
  File "/opt/stack/keystone/.venv/lib/python2.7/site-packages/nose/importer.py", line 39, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/opt/stack/keystone/.venv/lib/python2.7/site-packages/nose/importer.py", line 86, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/opt/stack/keystone/tests/test_v3_auth.py", line 24, in <module>
    import test_v3
ImportError: No module named test_v3
-------------------- >> begin captured logging << --------------------
keystone.auth.controllers: WARNING: duplicate option: password
keystone.auth.controllers: WARNING: duplicate option: token
--------------------- >> end captured logging << ---------------------

----------------------------------------------------------------------
Ran 1 test in 0.001s

FAILED (errors=1)

Deleting the __init__.py file fixes this.

Adam Young (ayoung)
Changed in keystone:
assignee: nobody → Adam Young (ayoung)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

Changed in keystone:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/23854
Committed: http://github.com/openstack/keystone/commit/d8599dcda06514a9687af3f714e55ff7580af9db
Submitter: Jenkins
Branch: master

commit d8599dcda06514a9687af3f714e55ff7580af9db
Author: Adam Young <email address hidden>
Date: Thu Mar 7 16:21:08 2013 -0500

    from tests import

    Makes the resolution of local imports work
    when running individual tests.

    Bug 1152326

    Change-Id: I72f54bdbb60a6d7acf32bdbdc02d7bce69add84e

Changed in keystone:
status: In Progress → Fix Committed
Revision history for this message
Adam Young (ayoung) wrote :

Fix did not work. The two patches have been reverted. We will re apply once we have confirmed positive working approaches.

Changed in keystone:
status: Fix Committed → In Progress
Revision history for this message
Adam Young (ayoung) wrote :

Rolled back the origianl change that broke the tests. We will revisit in Havana.

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → grizzly-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: grizzly-rc1 → 2013.1
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.