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

Reduce number of places where sys.path is (possibly) updated for external module paths.

Change-Id: I69d060f27ea090d14405e884d1ce271975358c56
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Sun Nov 30 20:54:04 CET 2014 on sn-devel-104
This commit is contained in:
Jelmer Vernooij 2014-11-04 20:37:41 +00:00
parent 4323504921
commit 7dbc58f524
6 changed files with 17 additions and 19 deletions

View File

@ -26,6 +26,8 @@ from samba.samdb import SamDB
import subprocess
import tempfile
samba.ensure_external_module("mimeparse", "mimeparse")
samba.ensure_external_module("extras", "extras")
samba.ensure_external_module("testtools", "testtools")
# Other modules import these two classes from here, for convenience:

View File

@ -37,9 +37,7 @@ signal.signal(signal.SIGINT, signal.SIG_DFL)
import optparse
import samba
import sys
samba.ensure_external_module("mimeparse", "mimeparse")
samba.ensure_external_module("extras", "extras")
samba.ensure_external_module("testtools", "testtools")
import samba.tests
samba.ensure_external_module("subunit", "subunit/python")
import subunit.run

View File

@ -19,14 +19,15 @@
# to upstream subunit's filtering tools.
import optparse
import os
import sys
import signal
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/subunit/python"))
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/testtools"))
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/mimeparse"))
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/extras"))
sys.path.insert(0, "bin/python")
import samba
samba.ensure_external_module("mimeparse", "mimeparse")
samba.ensure_external_module("extras", "extras")
samba.ensure_external_module("testtools", "testtools")
samba.ensure_external_module("subunit", "subunit/python")
import subunithelper

View File

@ -9,10 +9,12 @@ import os
import signal
import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/subunit/python"))
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/testtools"))
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/mimeparse"))
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/extras"))
sys.path.insert(0, "bin/python")
import samba
samba.ensure_external_module("mimeparse", "mimeparse")
samba.ensure_external_module("extras", "extras")
samba.ensure_external_module("testtools", "testtools")
samba.ensure_external_module("subunit", "subunit/python")
import subunithelper

View File

@ -30,8 +30,7 @@ import time
import random
sys.path.insert(0, "bin/python")
import samba
samba.ensure_external_module("testtools", "testtools")
import samba.tests
from ldb import SCOPE_BASE, LdbError

View File

@ -24,10 +24,8 @@ import time
import os
sys.path.insert(0, "bin/python")
import samba
import samba.tests
from samba import dsdb
samba.ensure_external_module("testtools", "testtools")
samba.ensure_external_module("subunit", "subunit/python")
from ldb import (
SCOPE_BASE,
@ -35,8 +33,6 @@ from ldb import (
FLAG_MOD_REPLACE,
)
import samba.tests
class DrsBaseTestCase(samba.tests.BlackboxTestCase):
"""Base class implementation for all DRS python tests.