$44 GRAYBYTE WORDPRESS FILE MANAGER $51

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/usr/lib64/python2.7/site-packages/sqlalchemy/testing/plugin/

HOME
Current File : /usr/lib64/python2.7/site-packages/sqlalchemy/testing/plugin//bootstrap.py
# testing/plugin/bootstrap.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
"""
Bootstrapper for test framework plugins.

The entire rationale for this system is to get the modules in plugin/
imported without importing all of the supporting library, so that we can
set up things for testing before coverage starts.

The rationale for all of plugin/ being *in* the supporting library in the
first place is so that the testing and plugin suite is available to other
libraries, mainly external SQLAlchemy and Alembic dialects, to make use
of the same test environment and standard suites available to
SQLAlchemy/Alembic themselves without the need to ship/install a separate
package outside of SQLAlchemy.


"""

import os
import sys


bootstrap_file = locals()["bootstrap_file"]
to_bootstrap = locals()["to_bootstrap"]


def load_file_as_module(name):
    path = os.path.join(os.path.dirname(bootstrap_file), "%s.py" % name)

    if sys.version_info >= (3, 5):
        import importlib.util

        spec = importlib.util.spec_from_file_location(name, path)
        assert spec is not None
        assert spec.loader is not None
        mod = importlib.util.module_from_spec(spec)
        spec.loader.exec_module(mod)
    else:
        import imp

        mod = imp.load_source(name, path)

    return mod


if to_bootstrap == "pytest":
    sys.modules["sqla_plugin_base"] = load_file_as_module("plugin_base")
    sys.modules["sqla_plugin_base"].bootstrapped_as_sqlalchemy = True
    if sys.version_info < (3, 0):
        sys.modules["sqla_reinvent_fixtures"] = load_file_as_module(
            "reinvent_fixtures_py2k"
        )
    sys.modules["sqla_pytestplugin"] = load_file_as_module("pytestplugin")
else:
    raise Exception("unknown bootstrap: %s" % to_bootstrap)  # noqa

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
23 Sep 2024 10.41 AM
root / root
0755
__init__.py
0.241 KB
5 Sep 2024 10.50 PM
root / root
0644
__init__.pyc
0.155 KB
23 Sep 2024 10.41 AM
root / root
0644
bootstrap.py
1.903 KB
5 Sep 2024 10.50 PM
root / root
0644
bootstrap.pyc
1.997 KB
23 Sep 2024 10.41 AM
root / root
0644
plugin_base.py
21.042 KB
5 Sep 2024 10.50 PM
root / root
0644
plugin_base.pyc
23.883 KB
23 Sep 2024 10.41 AM
root / root
0644
pytestplugin.py
25.766 KB
5 Sep 2024 10.50 PM
root / root
0644
pytestplugin.pyc
23.476 KB
23 Sep 2024 10.41 AM
root / root
0644
reinvent_fixtures_py2k.py
3.466 KB
5 Sep 2024 10.50 PM
root / root
0644
reinvent_fixtures_py2k.pyc
4.188 KB
23 Sep 2024 10.41 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF