mirror of
https://github.com/sqlalchemy/sqlalchemy.git
synced 2026-05-11 03:10:38 -04:00
3e486caaab
- Fixed PendingDeprecationWarning involving order_by parameter on relation(). [ticket:1226] - Unit tests still filter pending deprecation warnings but have a commented-out line to temporarily disable this behavior. Tests need to be fully converted before we can turn this on.
37 lines
818 B
Python
37 lines
818 B
Python
"""First import for all test cases, sets sys.path and loads configuration."""
|
|
|
|
import sys, os, logging, warnings
|
|
|
|
if sys.version_info < (2, 4):
|
|
warnings.filterwarnings('ignore', category=FutureWarning)
|
|
|
|
|
|
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
|
|
|