Test fails in nose loader when run under debugger

  • 0
  • 7

I am working on openstack code. When I run a unit test without the debugger it works fine:

/home/henry/Dev/openstack/quantum/.venv/bin/python run_tests.py -P quantum.tests.unit.test_db_plugin:TestSubnetsV2XML.test_create_subnet_bad_pools
nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
TestSubnetsV2XML
    test_create_subnet_bad_pools (quantum.tests.unit.test_db_plugin.TestSubnetsV2XML)OK

----------------------------------------------------------------------
Ran 1 test in 0.129s

OK

Process finished with exit code 0


When I run it under the debugger, it fails:

Connected to pydev debugger (build 125.57)
/home/henry/Dev/openstack/quantum/.venv/bin/python /home/henry/utils/pycharm/pycharm-2.7/helpers/pydev/pydevd.py --multiproc --client 127.0.0.1 --port 37140 --file run_tests.py -P quantum.tests.unit.test_db_plugin:TestSubnetsV2XML.test_create_subnet_bad_pools
pydev debugger: process 3280 is connecting

nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
Failure
    Failure: AttributeError ('module' object has no attribute 'test_db_plugin')ERROR

======================================================================
ERROR: Failure: AttributeError ('module' object has no attribute 'test_db_plugin')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/henry/Dev/openstack/quantum/.venv/local/lib/python2.7/site-packages/nose/loader.py", line 379, in loadTestsFromName
    module = resolve_name(addr.module)
  File "/home/henry/Dev/openstack/quantum/.venv/local/lib/python2.7/site-packages/nose/util.py", line 331, in resolve_name
    obj = getattr(obj, part)
AttributeError: 'module' object has no attribute 'test_db_plugin'

----------------------------------------------------------------------
Ran 1 test in 0.003s

FAILED (errors=1)

Process finished with exit code 1


Help?