Using testr unable to discover native python test-scripts
I am newbie to testr.
I have a package with following directory and coding structure:
testpkg
------------
|
|
|__init__.py
|
|--- libraries for the testcases(3 such files)
|
| --- test suite files
|
| -- testclass(name same as test_suite filename)
With above structure, I want to run the testcases using testr.
If I define the '.testr.conf' as below, then it runs all the tests inside the testsuite 'tc_pc' but reports FAILED, although the testsuite has ALL PASSED testcases. I am suspecting that testr expects a returncode which my testsuite is not returning
[DEFAULT]
test_command=python tc_pc.py discover . $LISTOPT $IDOPTION
test_id_
test_list_
If I want to testr to discover all testuites or testcases available in the 'testpkg', then it does not discover any testcase, because nothing is returned on 'testr list-tests' . Here is my config
[DEFAULT]
test_command=python -m subunit.run discover testpkg $LISTOPT $IDOPTION
test_id_
test_list_
Btw.. I am running testr from the 'testpkg' directory
What changes or what am I need to correct to achieve what I intend to do ? Any input
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- testtools Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
This question was originally filed as bug #1431047.
Can you help with this problem?
Provide an answer of your own, or ask puppet-py for more information if necessary.