1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

subunitrun: Use new samba.subunit.run module.

Change-Id: I4a4d2237ec9ef090bf95a0ea57285610047451e5
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Jelmer Vernooij 2014-12-11 01:12:11 +00:00 committed by Andrew Bartlett
parent 3f1ecfd2d0
commit 44a561fa45

View File

@ -35,16 +35,9 @@ import signal
signal.signal(signal.SIGINT, signal.SIG_DFL)
import optparse
import samba
import sys
import samba.tests
samba.ensure_external_module("subunit", "subunit/python")
import subunit.run
try:
from subunit.run import TestProgram as BaseTestProgram
except ImportError:
from unittest import TestProgram as BaseTestProgram
from samba.subunit.run import TestProgram as BaseTestProgram
class SubunitOptions(optparse.OptionGroup):
@ -69,5 +62,4 @@ class TestProgram(BaseTestProgram):
if getattr(opts, 'load_list', None):
args.insert(0, "--load-list=%s" % opts.load_list)
argv = [sys.argv[0]] + args
super(TestProgram, self).__init__(module=module, argv=argv,
testRunner=subunit.run.SubunitTestRunner())
super(TestProgram, self).__init__(module=module, argv=argv)