blob: bdfd6efc0ef4ca47c426b4b974c5d53327e76d36 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
"""First import for all test cases, sets sys.path and loads configuration."""
import sys, os, logging
from testlib.testing import main
import testlib.config
_setup = False
def configure_for_tests():
"""import testenv; testenv.configure_for_tests()"""
global _setup
if not _setup:
sys.path.insert(0, os.path.join(os.getcwd(), 'lib'))
logging.basicConfig()
testlib.config.configure()
_setup = True
def simple_setup():
"""import testenv; testenv.simple_setup()"""
global _setup
if not _setup:
sys.path.insert(0, os.path.join(os.getcwd(), 'lib'))
logging.basicConfig()
testlib.config.configure_defaults()
_setup = True
|