diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6da1a4d..d2b474e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,6 +22,7 @@ jobs: run: "pre-commit run --all" ci-test: concurrency: hana-tests + if: ${{ github.event_name == 'pull_request' }} strategy: fail-fast: false max-parallel: 1 diff --git a/test/test_hana_connect_url.py b/test/test_hana_connect_url.py index 3d74a23..a8642d8 100644 --- a/test/test_hana_connect_url.py +++ b/test/test_hana_connect_url.py @@ -5,7 +5,6 @@ class HANAConnectUrlWithTenantTest(sqlalchemy.testing.fixtures.TestBase): - @sqlalchemy.testing.only_on("hana+hdbcli") def test_hdbcli_tenant_url_default_port(self): """If the URL includes a tenant database, the dialect pass the adjusted values to hdbcli. @@ -23,7 +22,6 @@ def test_hdbcli_tenant_url_default_port(self): assert result_kwargs["password"] == "secret-password" assert result_kwargs["databaseName"] == "TENANT_NAME" - @sqlalchemy.testing.only_on("hana+hdbcli") def test_hdbcli_tenant_url_changed_port(self): """If the URL includes a tenant database, the dialect pass the adjusted values to hdbcli. @@ -41,7 +39,6 @@ def test_hdbcli_tenant_url_changed_port(self): class HANAConnectUrlWithHDBUserStoreTest(sqlalchemy.testing.fixtures.TestBase): - @sqlalchemy.testing.only_on("hana+hdbcli") def test_parsing_userkey_hdbcli(self): """With HDBCLI, the user may reference to a local HDBUserStore key which holds the connection details. SQLAlchemy-HANA should only pass the userkey name to @@ -55,7 +52,6 @@ def test_parsing_userkey_hdbcli(self): class HANAConnectUrlParsing(sqlalchemy.testing.fixtures.TestBase): - @sqlalchemy.testing.only_on("hana+hdbcli") def test_pass_uri_query_as_kwargs(self): """SQLAlchemy-HANA should passes all URL parameters to hdbcli.""" diff --git a/test/test_hana_connection.py b/test/test_hana_connection.py index c1d1f72..a486946 100644 --- a/test/test_hana_connection.py +++ b/test/test_hana_connection.py @@ -3,14 +3,11 @@ from unittest.mock import Mock import sqlalchemy.testing +from hdbcli.dbapi import Error class HANAHDBCLIConnectionIsDisconnectedTest(sqlalchemy.testing.fixtures.TestBase): - __only_on__ = "hana+hdbcli" - def test_detection_by_error_code(self): - from hdbcli.dbapi import Error - dialect = sqlalchemy.testing.db.dialect assert dialect.is_disconnect(Error(-10709, "Connect failed"), None, None) diff --git a/test/test_hana_sql.py b/test/test_hana_sql.py index 075872f..d257678 100644 --- a/test/test_hana_sql.py +++ b/test/test_hana_sql.py @@ -7,8 +7,6 @@ class HANACompileTest( sqlalchemy.testing.fixtures.TestBase, sqlalchemy.testing.AssertsCompiledSQL ): - __only_on__ = "hana" - def test_sql_with_for_update(self): table1 = table("mytable", column("myid"), column("name"), column("description")) diff --git a/test/test_isolation_level.py b/test/test_isolation_level.py index ad302f3..1d95827 100644 --- a/test/test_isolation_level.py +++ b/test/test_isolation_level.py @@ -6,8 +6,6 @@ class IsolationLevelTest(sqlalchemy.testing.fixtures.TestBase): - __only_on__ = "hana" - def _default_isolation_level(self): return "READ COMMITTED"