XYZ 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
(2.91 KB)
📄
__init__.pyc
(3.76 KB)
📄
assertions.py
(28.45 KB)
📄
assertions.pyc
(33.3 KB)
📄
assertsql.py
(14.61 KB)
📄
assertsql.pyc
(16.01 KB)
📄
asyncio.py
(3.58 KB)
📄
asyncio.pyc
(3.68 KB)
📄
config.py
(9.44 KB)
📄
config.pyc
(12.53 KB)
📄
engines.py
(13.08 KB)
📄
engines.pyc
(18.08 KB)
📄
entities.py
(3.18 KB)
📄
entities.pyc
(3.45 KB)
📄
exclusions.py
(13 KB)
📄
exclusions.pyc
(19.95 KB)
📄
fixtures.py
(30.2 KB)
📄
fixtures.pyc
(31.37 KB)
📄
mock.py
(894 B)
📄
mock.pyc
(780 B)
📄
pickleable.py
(2.82 KB)
📄
pickleable.pyc
(8.26 KB)
📁
plugin
📄
profiling.py
(10.4 KB)
📄
profiling.pyc
(10.07 KB)
📄
provision.py
(12.03 KB)
📄
provision.pyc
(14.02 KB)
📄
requirements.py
(43.58 KB)
📄
requirements.pyc
(72.82 KB)
📄
schema.py
(6.39 KB)
📄
schema.pyc
(7.42 KB)
📁
suite
📄
util.py
(13.68 KB)
📄
util.pyc
(18.08 KB)
📄
warnings.py
(2.41 KB)
📄
warnings.pyc
(2.52 KB)
Editing: warnings.py
# testing/warnings.py # Copyright (C) 2005-2024 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php from __future__ import absolute_import import warnings from . import assertions from .. import exc as sa_exc from ..util.langhelpers import _warnings_warn class SATestSuiteWarning(Warning): """warning for a condition detected during tests that is non-fatal Currently outside of SAWarning so that we can work around tools like Alembic doing the wrong thing with warnings. """ def warn_test_suite(message): _warnings_warn(message, category=SATestSuiteWarning) def setup_filters(): """Set global warning behavior for the test suite.""" # TODO: at this point we can use the normal pytest warnings plugin, # if we decide the test suite can be linked to pytest only origin = r"^(?:test|sqlalchemy)\..*" warnings.filterwarnings( "ignore", category=sa_exc.SAPendingDeprecationWarning ) warnings.filterwarnings("error", category=sa_exc.SADeprecationWarning) warnings.filterwarnings("error", category=sa_exc.SAWarning) warnings.filterwarnings("always", category=SATestSuiteWarning) warnings.filterwarnings( "error", category=DeprecationWarning, module=origin ) warnings.filterwarnings( "ignore", category=DeprecationWarning, message=r".*The default (?:date)?(?:time)?(?:stamp)? " r"(adapter|converter) is deprecated", ) # ignore things that are deprecated *as of* 2.0 :) warnings.filterwarnings( "ignore", category=sa_exc.SADeprecationWarning, message=r".*\(deprecated since: 2.0\)$", ) warnings.filterwarnings( "ignore", category=sa_exc.SADeprecationWarning, message=r"^The (Sybase|firebird) dialect is deprecated and will be", ) try: import pytest except ImportError: pass else: warnings.filterwarnings( "once", category=pytest.PytestDeprecationWarning, module=origin ) def assert_warnings(fn, warning_msgs, regex=False): """Assert that each of the given warnings are emitted by fn. Deprecated. Please use assertions.expect_warnings(). """ with assertions._expect_warnings( sa_exc.SAWarning, warning_msgs, regex=regex ): return fn()
Upload File
Create Folder