Merge lp:~james-w/subunit/discovery into lp:~subunit/subunit/trunk
Status: | Merged |
---|---|
Merged at revision: | 129 |
Proposed branch: | lp:~james-w/subunit/discovery |
Merge into: | lp:~subunit/subunit/trunk |
Diff against target: |
69 lines (+35/-6) 2 files modified
NEWS (+7/-0) python/subunit/run.py (+28/-6) |
To merge this branch: | bzr merge lp:~james-w/subunit/discovery |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Collins | Needs Fixing | ||
Review via email: mp+26893@code.launchpad.net |
Commit message
Support test discovery.
Description of the change
Hi,
Here's a hacky first pass at implementing discovery in the way you suggested.
The biggest thing is that there is no way to pass a testsuite to TestProgram,
so I implemented some of that class inline to get the job done.
I tested this with testr
mkdir foo
touch foo/__init__.py
create foo/test_foo.py with
from testtools import TestCase
class foo(TestCase):
def test_pass(self): pass
def test_fail(self): self.fail("foo")
and .testr.conf with
[DEFAULT]
test_command=python -m subunit.run $IDLIST
test_id_
as I said on IRC the --discover . was a little unexpected to me, and I
don't think it's ideal that it is required to be that.
This is clearly quite hacky, so I'm looking for suggestions on cleaning it
up.
Thanks,
James
As discussed, this is best done in testtools.run and subunit.run changed to layer on that; the testtools part has landed.