Using testr unable to discover native python test-scripts

Bug #1431047 reported by puppet-py

This bug report was converted into a question: question #263535: Using testr unable to discover native python test-scripts.

6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
testtools
Invalid
Undecided
Unassigned

Bug Description

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)
                      |-- each testcase is a definition inside the testclass

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_option=--load-list $IDFILE
test_list_option=--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_option=--load-list $IDFILE
test_list_option=--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

Revision history for this message
puppet-py (jbanerje) wrote :

This is not a bug but a question

Changed in testtools:
status: New → Invalid
puppet-py (jbanerje)
Changed in testtools:
status: Invalid → New
Changed in testtools:
status: New → Invalid
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.