From 44a561fa455a98cd239b8c1dab196fe176ef39b5 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 11 Dec 2014 01:12:11 +0000 Subject: [PATCH] subunitrun: Use new samba.subunit.run module. Change-Id: I4a4d2237ec9ef090bf95a0ea57285610047451e5 Signed-Off-By: Jelmer Vernooij Reviewed-by: Andrew Bartlett --- python/samba/tests/subunitrun.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/python/samba/tests/subunitrun.py b/python/samba/tests/subunitrun.py index 291e7ab461a..21a7115dcae 100755 --- a/python/samba/tests/subunitrun.py +++ b/python/samba/tests/subunitrun.py @@ -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)