Re-use more common code.
authorJonathan Lange <jml@mumak.net>
Fri, 20 Apr 2012 11:41:18 +0000 (12:41 +0100)
committerJonathan Lange <jml@mumak.net>
Fri, 20 Apr 2012 11:41:18 +0000 (12:41 +0100)
filters/subunit-filter

index 945f80d40a5789d825bcbb9009e95601ac7deb66..4f63d2ea497a4dcab3a893e6367824d9c5ed7bd8 100755 (executable)
@@ -36,6 +36,7 @@ from subunit import (
     TestProtocolClient,
     read_test_list,
     )
+from subunit.filters import run_tests_from_stream
 from subunit.test_results import (
     and_predicates,
     _make_tag_filter,
@@ -147,8 +148,5 @@ else:
     passthrough_stream = None
 
 result = make_result(sys.stdout, options, tag_filter)
-test = ProtocolTestCase(sys.stdin, passthrough=passthrough_stream)
-result.startTestRun()
-test.run(result)
-result.stopTestRun()
+run_tests_from_stream(sys.stdin, result, passthrough_stream)
 sys.exit(0)