mirror of
https://github.com/samba-team/samba.git
synced 2025-01-04 05:18:06 +03:00
subunitrun: Remove global subunit module when reimporting from a
different location.
This commit is contained in:
parent
8f4c064b49
commit
b1daa50293
@ -26,7 +26,12 @@ import optparse
|
|||||||
import samba
|
import samba
|
||||||
samba.ensure_external_module("testtools", "testtools")
|
samba.ensure_external_module("testtools", "testtools")
|
||||||
samba.ensure_external_module("subunit", "subunit/python")
|
samba.ensure_external_module("subunit", "subunit/python")
|
||||||
from subunit.run import SubunitTestRunner, TestProgram
|
try:
|
||||||
|
from subunit.run import SubunitTestRunner, TestProgram
|
||||||
|
except ImportError:
|
||||||
|
del sys.modules["subunit"]
|
||||||
|
samba.import_bundled_package("subunit", "subunit/python")
|
||||||
|
from subunit.run import SubunitTestRunner, TestProgram
|
||||||
import samba.getopt as options
|
import samba.getopt as options
|
||||||
import samba.tests
|
import samba.tests
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user