Hackfut Security File Manager
Current Path:
/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/testing
opt
/
alt
/
python27
/
lib64
/
python2.7
/
site-packages
/
sqlalchemy
/
testing
/
📁
..
📄
__init__.py
(1.12 KB)
📄
__init__.pyc
(1.84 KB)
📄
__init__.pyo
(1.84 KB)
📄
assertions.py
(16.64 KB)
📄
assertions.pyc
(20.71 KB)
📄
assertions.pyo
(19.03 KB)
📄
assertsql.py
(12.29 KB)
📄
assertsql.pyc
(14.05 KB)
📄
assertsql.pyo
(13.78 KB)
📄
config.py
(2.67 KB)
📄
config.pyc
(4.1 KB)
📄
config.pyo
(4.01 KB)
📄
engines.py
(9.29 KB)
📄
engines.pyc
(14.47 KB)
📄
engines.pyo
(14.38 KB)
📄
entities.py
(2.92 KB)
📄
entities.pyc
(3.12 KB)
📄
entities.pyo
(3.12 KB)
📄
exclusions.py
(12.35 KB)
📄
exclusions.pyc
(19.3 KB)
📄
exclusions.pyo
(19.13 KB)
📄
fixtures.py
(10.47 KB)
📄
fixtures.pyc
(16.16 KB)
📄
fixtures.pyo
(16.08 KB)
📄
mock.py
(630 B)
📄
mock.pyc
(664 B)
📄
mock.pyo
(664 B)
📄
pickleable.py
(2.58 KB)
📄
pickleable.pyc
(7.7 KB)
📄
pickleable.pyo
(7.7 KB)
📁
plugin
📄
profiling.py
(8.2 KB)
📄
profiling.pyc
(8.5 KB)
📄
profiling.pyo
(8.5 KB)
📄
provision.py
(10.13 KB)
📄
provision.pyc
(13.72 KB)
📄
provision.pyo
(13.72 KB)
📄
replay_fixture.py
(5.3 KB)
📄
replay_fixture.pyc
(7.5 KB)
📄
replay_fixture.pyo
(7.5 KB)
📄
requirements.py
(22.16 KB)
📄
requirements.pyc
(37.59 KB)
📄
requirements.pyo
(37.59 KB)
📄
runner.py
(1.55 KB)
📄
runner.pyc
(1.84 KB)
📄
runner.pyo
(1.84 KB)
📄
schema.py
(3.47 KB)
📄
schema.pyc
(3.18 KB)
📄
schema.pyo
(3.18 KB)
📁
suite
📄
util.py
(7.36 KB)
📄
util.pyc
(10.67 KB)
📄
util.pyo
(10.63 KB)
📄
warnings.py
(1.27 KB)
📄
warnings.pyc
(1.37 KB)
📄
warnings.pyo
(1.37 KB)
Editing: config.py
# testing/config.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import collections requirements = None db = None db_url = None db_opts = None file_config = None test_schema = None test_schema_2 = None _current = None try: from unittest import SkipTest as _skip_test_exception except ImportError: _skip_test_exception = None class Config(object): def __init__(self, db, db_opts, options, file_config): self._set_name(db) self.db = db self.db_opts = db_opts self.options = options self.file_config = file_config self.test_schema = "test_schema" self.test_schema_2 = "test_schema_2" _stack = collections.deque() _configs = set() def _set_name(self, db): if db.dialect.server_version_info: svi = ".".join(str(tok) for tok in db.dialect.server_version_info) self.name = "%s+%s_[%s]" % (db.name, db.driver, svi) else: self.name = "%s+%s" % (db.name, db.driver) @classmethod def register(cls, db, db_opts, options, file_config): """add a config as one of the global configs. If there are no configs set up yet, this config also gets set as the "_current". """ cfg = Config(db, db_opts, options, file_config) cls._configs.add(cfg) return cfg @classmethod def set_as_current(cls, config, namespace): global db, _current, db_url, test_schema, test_schema_2, db_opts _current = config db_url = config.db.url db_opts = config.db_opts test_schema = config.test_schema test_schema_2 = config.test_schema_2 namespace.db = db = config.db @classmethod def push_engine(cls, db, namespace): assert _current, "Can't push without a default Config set up" cls.push( Config( db, _current.db_opts, _current.options, _current.file_config), namespace ) @classmethod def push(cls, config, namespace): cls._stack.append(_current) cls.set_as_current(config, namespace) @classmethod def reset(cls, namespace): if cls._stack: cls.set_as_current(cls._stack[0], namespace) cls._stack.clear() @classmethod def all_configs(cls): return cls._configs @classmethod def all_dbs(cls): for cfg in cls.all_configs(): yield cfg.db def skip_test(self, msg): skip_test(msg) def skip_test(msg): raise _skip_test_exception(msg)
Upload File
Create Folder