Bug 187719 - NB can't run tests in packages
NB can't run tests in packages
Status: NEW
Product: python
Classification: Unclassified
Component: Testing
6.x
PC All
: P2 (vote)
: TBD
Assigned To: Torbjorn Norbye
issues@python
: TEST
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-17 11:17 UTC by ravx
Modified: 2010-06-17 11:17 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ravx 2010-06-17 11:17:39 UTC
In a situation where we have packages in a project, you can not run the tests.
For example, if we have a structure:

<Top Level>:
        |
        +-Main:
        |   |-__init__.py
        |   |-file1.py
        |
       +-Test:
            |-__init__.py
            |-file1_test.py (Test Unit)

When I try to run the tests in the module file1_test.py get an error from nb_test_runner.py (line 216):
"""
0 tests, 0 failures, 0 errors
    module = __import__ (module_name, globals (), locals (), module_name)
ImportError: No module named file1_test.py
"""
When you move to file1_test.py <Top Level> everything is in OK - tests runs. What's more - no problem running the modules in packages, such as main.file1.py


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo