コード例 #1
0
ファイル: requirements.py プロジェクト: robin900/sqlalchemy
    def schemas(self):
        """Target database must support external schemas, and have one
        named 'test_schema'."""

        return skip_if([
                    "firebird"
                ], "no schema support")
コード例 #2
0
ファイル: requirements.py プロジェクト: BY-jk/sqlalchemy
 def postgresql_test_dblink(self):
     return skip_if(
         lambda config: not config.file_config.has_option(
             "sqla_testing", "postgres_test_db_link"
         ),
         "postgres_test_db_link option not specified in config",
     )
コード例 #3
0
ファイル: requirements.py プロジェクト: BY-jk/sqlalchemy
    def time_microseconds(self):
        """target dialect supports representation of Python
        datetime.time() with microsecond objects."""

        return skip_if(
            ["mssql", "mysql", "firebird", "+zxjdbc", "oracle", "sybase"]
        )
コード例 #4
0
ファイル: requirements.py プロジェクト: BY-jk/sqlalchemy
    def two_phase_transactions(self):
        """Target database must support two-phase transactions."""

        return skip_if(
            [
                no_support("firebird", "no SA implementation"),
                no_support("mssql", "two-phase xact not supported by drivers"),
                no_support(
                    "oracle", "two-phase xact not implemented in SQLA/oracle"
                ),
                no_support(
                    "drizzle", "two-phase xact not supported by database"
                ),
                no_support(
                    "sqlite", "two-phase xact not supported by database"
                ),
                no_support(
                    "sybase", "two-phase xact not supported by drivers/SQLA"
                ),
                no_support(
                    "postgresql+zxjdbc",
                    "FIXME: JDBC driver confuses the transaction state, "
                    "may need separate XA implementation",
                ),
                no_support(
                    "mysql",
                    "recent MySQL communiity editions have too many issues "
                    "(late 2016), disabling for now",
                ),
            ]
        )
コード例 #5
0
ファイル: requirements.py プロジェクト: BY-jk/sqlalchemy
    def non_updating_cascade(self):
        """target database must *not* support ON UPDATE..CASCADE behavior in
        foreign keys."""

        return fails_on_everything_except(
            "sqlite", "oracle", "+zxjdbc"
        ) + skip_if("mssql")
コード例 #6
0
ファイル: requirements.py プロジェクト: NeilTruick/sqlalchemy
 def binary_comparisons(self):
     """target database/driver can allow BLOB/BINARY fields to be compared
     against a bound parameter value.
     """
     return skip_if(["oracle", "mssql"],
             "not supported by database/driver"
         )
コード例 #7
0
ファイル: requirements.py プロジェクト: NeilTruick/sqlalchemy
    def unbounded_varchar(self):
        """Target database must support VARCHAR with no length"""

        return skip_if([
                "firebird", "oracle", "mysql"
            ], "not supported by database"
            )
コード例 #8
0
ファイル: requirements.py プロジェクト: robin900/sqlalchemy
 def two_phase_recovery(self):
     return self.two_phase_transactions + (
         skip_if(
            "mysql",
            "crashes on most mariadb and mysql versions"
         )
     )
コード例 #9
0
ファイル: requirements.py プロジェクト: BY-jk/sqlalchemy
    def savepoints(self):
        """Target database must support savepoints."""

        return skip_if(
            ["sqlite", "sybase", ("mysql", "<", (5, 0, 3))],
            "savepoints not supported",
        )
コード例 #10
0
ファイル: requirements.py プロジェクト: NeilTruick/sqlalchemy
    def standalone_binds(self):
        """target database/driver supports bound parameters as column expressions
        without being in the context of a typed column.

        """
        return skip_if(["firebird", "mssql+mxodbc"],
                "not supported by driver")
コード例 #11
0
ファイル: requirements.py プロジェクト: BY-jk/sqlalchemy
    def on_update_cascade(self):
        """target database must support ON UPDATE..CASCADE behavior in
        foreign keys."""

        return skip_if(
            ["sqlite", "oracle"],
            "target backend %(doesnt_support)s ON UPDATE CASCADE",
        )
コード例 #12
0
ファイル: requirements.py プロジェクト: rlugojr/sqlalchemy
    def precision_numerics_enotation_large(self):
        """target backend supports Decimal() objects using E notation
        to represent very large values."""

        return skip_if(
            [("sybase+pyodbc", None, None,
              "Don't know how do get these values through FreeTDS + Sybase"),
             ("firebird", None, None, "Precision must be from 1 to 18")])
コード例 #13
0
ファイル: requirements.py プロジェクト: cpcloud/sqlalchemy
 def unicode_connections(self):
     """
     Target driver must support some encoding of Unicode across the wire.
     """
     # TODO: expand to exclude MySQLdb versions w/ broken unicode
     return skip_if([
         exclude('mysql', '<', (4, 1, 1), 'no unicode connection support'),
         ])
コード例 #14
0
    def threading_with_mock(self):
        """Mark tests that use threading and mock at the same time - stability
        issues have been observed with coverage + python 3.3

        """
        return skip_if(
            lambda: util.py3k and self.config.options.enable_plugin_coverage, "Stability issues with coverage + py3k"
        )
コード例 #15
0
ファイル: requirements.py プロジェクト: FlipperPA/sqlalchemy
    def dbapi_lastrowid(self):
        """"target backend includes a 'lastrowid' accessor on the DBAPI
        cursor object.

        """
        return skip_if('mssql+pymssql', 'crashes on pymssql') + \
                    fails_on_everything_except('mysql',
                                       'sqlite+pysqlite', 'sqlite+pysqlcipher')
コード例 #16
0
ファイル: requirements.py プロジェクト: NeilTruick/sqlalchemy
    def deferrable_or_no_constraints(self):
        """Target database must support derferable constraints."""

        return skip_if([
            no_support('firebird', 'not supported by database'),
            no_support('mysql', 'not supported by database'),
            no_support('mssql', 'not supported by database'),
            ])
コード例 #17
0
ファイル: requirements.py プロジェクト: NeilTruick/sqlalchemy
    def on_update_cascade(self):
        """target database must support ON UPDATE..CASCADE behavior in
        foreign keys."""

        return skip_if(
                    ['sqlite', 'oracle'],
                    'target backend does not support ON UPDATE CASCADE'
                )
コード例 #18
0
ファイル: requirements.py プロジェクト: GitHublong/sqlalchemy
 def percent_schema_names(self):
     return skip_if(
             [
                 ("+psycopg2", None, None,
                         "psycopg2 2.4 no longer accepts % in bind placeholders"),
                 ("mysql", None, None, "executemany() doesn't work here")
             ]
         )
コード例 #19
0
ファイル: requirements.py プロジェクト: NeilTruick/sqlalchemy
 def boolean_col_expressions(self):
     """Target database must support boolean expressions as columns"""
     return skip_if([
         no_support('firebird', 'not supported by database'),
         no_support('oracle', 'not supported by database'),
         no_support('mssql', 'not supported by database'),
         no_support('sybase', 'not supported by database'),
     ])
コード例 #20
0
    def reflectable_autoincrement(self):
        """Target database must support tables that can automatically generate
        PKs assuming they were reflected.

        this is essentially all the DBs in "identity" plus Postgresql, which
        has SERIAL support.  FB and Oracle (and sybase?) require the Sequence to
        be explicitly added, including if the table was reflected.
        """
        return skip_if(["firebird", "oracle", "sybase"], "not supported by database")
コード例 #21
0
ファイル: requirements.py プロジェクト: NeilTruick/sqlalchemy
    def ad_hoc_engines(self):
        """Test environment must allow ad-hoc engine/connection creation.

        DBs that scale poorly for many connections, even when closed, i.e.
        Oracle, may use the "--low-connections" option which flags this requirement
        as not present.

        """
        return skip_if(lambda: self.config.options.low_connections)
コード例 #22
0
ファイル: requirements.py プロジェクト: NeilTruick/sqlalchemy
 def unicode_ddl(self):
     """Target driver must support some degree of non-ascii symbol names."""
     # TODO: expand to exclude MySQLdb versions w/ broken unicode
     return skip_if([
         no_support('oracle', 'FIXME: no support in database?'),
         no_support('sybase', 'FIXME: guessing, needs confirmation'),
         no_support('mssql+pymssql', 'no FreeTDS support'),
         exclude('mysql', '<', (4, 1, 1), 'no unicode connection support'),
         ])
コード例 #23
0
ファイル: requirements.py プロジェクト: cpcloud/sqlalchemy
    def independent_cursors(self):
        """Target must support simultaneous, independent database cursors
        on a single connection."""

        return skip_if(
            [
                "mssql",
                "mysql"], "no driver support"
        )
コード例 #24
0
ファイル: requirements.py プロジェクト: cpcloud/sqlalchemy
    def memory_process_intensive(self):
        """Driver is able to handle the memory tests which run in a subprocess
        and iterate through hundreds of connections

        """
        return skip_if([
            no_support("oracle", "Oracle XE usually can't handle these"),
            no_support("mssql+pyodbc", "MS ODBC drivers struggle")
        ])
コード例 #25
0
    def savepoints(self):
        """Target database must support savepoints."""

        return skip_if([
                    "sqlite",
                    "sybase",
                    ("mysql", "<", (5, 0, 3)),
                    ("informix", "<", (11, 55, "xC3"))
                    ], "savepoints not supported")
コード例 #26
0
    def identity(self):
        """Target database must support GENERATED AS IDENTITY or a facsimile.

        Includes GENERATED AS IDENTITY, AUTOINCREMENT, AUTO_INCREMENT, or other
        column DDL feature that fills in a DB-generated identifier at INSERT-time
        without requiring pre-execution of a SEQUENCE or other artifact.

        """
        return skip_if(["firebird", "oracle", "postgresql", "sybase"], "not supported by database")
コード例 #27
0
ファイル: requirements.py プロジェクト: BY-jk/sqlalchemy
    def correlated_outer_joins(self):
        """Target must support an outer join to a subquery which
        correlates to the parent."""

        return skip_if(
            "oracle",
            'Raises "ORA-01799: a column may not be '
            'outer-joined to a subquery"',
        )
コード例 #28
0
ファイル: requirements.py プロジェクト: BY-jk/sqlalchemy
    def dbapi_lastrowid(self):
        """"target backend includes a 'lastrowid' accessor on the DBAPI
        cursor object.

        """
        return skip_if(
            "mssql+pymssql", "crashes on pymssql"
        ) + fails_on_everything_except(
            "mysql", "sqlite+pysqlite", "sqlite+pysqlcipher"
        )
コード例 #29
0
ファイル: requirements.py プロジェクト: BY-jk/sqlalchemy
    def deferrable_or_no_constraints(self):
        """Target database must support deferrable constraints."""

        return skip_if(
            [
                no_support("firebird", "not supported by database"),
                no_support("mysql", "not supported by database"),
                no_support("mssql", "not supported by database"),
            ]
        )
コード例 #30
0
 def unicode_ddl(self):
     """Target driver must support some encoding of Unicode across the wire."""
     # TODO: expand to exclude MySQLdb versions w/ broken unicode
     return skip_if([
         no_support('maxdb', 'database support flakey'),
         no_support('oracle', 'FIXME: no support in database?'),
         no_support('sybase', 'FIXME: guessing, needs confirmation'),
         no_support('mssql+pymssql', 'no FreeTDS support'),
         exclude('mysql', '<', (4, 1, 1), 'no unicode connection support'),
         ])
コード例 #31
0
    def time(self):
        """target dialect supports representation of Python
        datetime.time() objects."""

        return skip_if(['oracle'])
コード例 #32
0
    def implicitly_named_constraints(self):
        """target database must apply names to unnamed constraints."""

        return skip_if([
            no_support('sqlite', 'not supported by database'),
        ])
コード例 #33
0
    def skip_mysql_on_windows(self):
        """Catchall for a large variety of MySQL on Windows failures"""

        return skip_if(self._has_mysql_on_windows,
                       "Not supported on MySQL + Windows")
コード例 #34
0
    def updateable_autoincrement_pks(self):
        """Target must support UPDATE on autoincrement/integer primary key."""

        return skip_if(["mssql", "sybase"],
                       "IDENTITY columns can't be updated")
コード例 #35
0
 def ad_hoc_engines(self):
     return exclusions.skip_if(["oracle"])
コード例 #36
0
 def implements_get_lastrowid(self):
     return skip_if([
         no_support('sybase', 'not supported by database'),
     ])
コード例 #37
0
    def subqueries(self):
        """Target database must support subqueries."""

        return skip_if(exclude('mysql', '<', (4, 1, 1)), 'no subquery support')
コード例 #38
0
    def views(self):
        """Target database must support VIEWs."""

        return skip_if("drizzle", "no VIEW support")
コード例 #39
0
 def postgresql_test_dblink(self):
     return skip_if(
         lambda config: not config.file_config.has_option(
             'sqla_testing', 'postgres_test_db_link'),
         "postgres_test_db_link option not specified in config")
コード例 #40
0
 def binary_comparisons(self):
     """target database/driver can allow BLOB/BINARY fields to be compared
     against a bound parameter value.
     """
     return skip_if(["oracle", "mssql"], "not supported by database/driver")
コード例 #41
0
    def on_update_cascade(self):
        """target database must support ON UPDATE..CASCADE behavior in
        foreign keys."""

        return skip_if(['sqlite', 'oracle'],
                       'target backend %(doesnt_support)s ON UPDATE CASCADE')
コード例 #42
0
 def temporary_tables(self):
     """target database supports temporary tables"""
     return skip_if(["mssql", "firebird"], "not supported (?)")
コード例 #43
0
    def non_updating_cascade(self):
        """target database must *not* support ON UPDATE..CASCADE behavior in
        foreign keys."""

        return fails_on_everything_except('sqlite', 'oracle', '+zxjdbc') + \
            skip_if('mssql')
コード例 #44
0
 def fetch_rows_post_commit(self):
     return skip_if(["firebird"], "not supported")
コード例 #45
0
 def selectone(self):
     """target driver must support the literal statement 'select 1'"""
     return skip_if(["oracle", "firebird"],
                    "non-standard SELECT scalar syntax")
コード例 #46
0
 def insert_from_select(self):
     return skip_if(["firebird"], "crashes for unknown reason")
コード例 #47
0
 def sane_rowcount(self):
     return skip_if(
         lambda config: not config.db.dialect.supports_sane_rowcount,
         "driver doesn't support 'sane' rowcount")
コード例 #48
0
 def savepoints_w_release(self):
     return self.savepoints + skip_if(
         "oracle", "oracle doesn't support release of savepoint")
コード例 #49
0
 def unicode_data(self):
     """target drive must support unicode data stored in columns."""
     return skip_if([no_support("sybase", "no unicode driver support")])
コード例 #50
0
    def independent_cursors(self):
        """Target must support simultaneous, independent database cursors
        on a single connection."""

        return skip_if(["mssql+pyodbc", "mssql+mxodbc"], "no driver support")
コード例 #51
0
 def two_phase_recovery(self):
     return self.two_phase_transactions + (skip_if(
         "mysql", "crashes on most mariadb and mysql versions"))
コード例 #52
0
 def oracle_test_dblink(self):
     return skip_if(
         lambda config: not config.file_config.has_option(
             'sqla_testing', 'oracle_db_link'),
         "oracle_db_link option not specified in config")
コード例 #53
0
 def update_nowait(self):
     """Target database must support SELECT...FOR UPDATE NOWAIT"""
     return skip_if(["firebird", "mssql", "mysql", "sqlite", "sybase"],
                    "no FOR UPDATE NOWAIT support")
コード例 #54
0
 def fetch_null_from_numeric(self):
     return skip_if(
         ("mssql+pyodbc", None, None, "crashes due to bug #351"), )
コード例 #55
0
 def unique_constraint_reflection_no_index_overlap(self):
     return self.unique_constraint_reflection + skip_if("mysql")
コード例 #56
0
    def foreign_keys(self):
        """Target database must support foreign keys."""

        return skip_if(no_support('sqlite', 'not supported by database'))
コード例 #57
0
    def schemas(self):
        """Target database must support external schemas, and have one
        named 'test_schema'."""

        return skip_if(["firebird"], "no schema support")
コード例 #58
0
    def time_microseconds(self):
        """target dialect supports representation of Python
        datetime.time() with microsecond objects."""

        return skip_if(
            ['mssql', 'mysql', 'firebird', '+zxjdbc', 'oracle', 'sybase'])
コード例 #59
0
    def standalone_binds(self):
        """target database/driver supports bound parameters as column expressions
        without being in the context of a typed column.

        """
        return skip_if(["firebird", "mssql+mxodbc"], "not supported by driver")
コード例 #60
0
 def postgresql_jsonb(self):
     return only_on("postgresql >= 9.4") + skip_if(
         lambda config: config.db.dialect.driver == "pg8000" and config.db.
         dialect._dbapi_version <= (1, 10, 1))