mirror of
https://github.com/sqlalchemy/sqlalchemy.git
synced 2026-05-18 22:52:01 -04:00
17d3c8764e
- Importing testenv has no side effects- explicit functions provide similar behavior to the old immediate behavior of testbase - testing.db has the configured db - Fixed up the perf/* scripts
31 lines
712 B
Python
31 lines
712 B
Python
"""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
|