Skip to content

chore(sqlalchemy-bigquery): restore fail_under=100 in .coveragerc and…#17770

Draft
ohmayr wants to merge 3 commits into
fix-sqlalchemy-bigquery-geography-bugfrom
chore-sqlalchemy-bigquery-coverage-100
Draft

chore(sqlalchemy-bigquery): restore fail_under=100 in .coveragerc and…#17770
ohmayr wants to merge 3 commits into
fix-sqlalchemy-bigquery-geography-bugfrom
chore-sqlalchemy-bigquery-coverage-100

Conversation

@ohmayr

@ohmayr ohmayr commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

This PR restores coverage for sqlalchemy-bigquery

Towards #17459 🦕

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request increases the test coverage requirement to 100% in .coveragerc and noxfile.py, omits test directories from coverage, and adds a unit test for the deprecated dbapi method. The review feedback suggests improving the unit test by verifying that calling the deprecated dbapi() method correctly raises a deprecation warning.

Comment on lines +75 to +78
def test_dbapi_deprecated():
from sqlalchemy_bigquery.base import BigQueryDialect

assert BigQueryDialect.dbapi() is BigQueryDialect.import_dbapi()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Since dbapi() is deprecated, the test should verify that calling it raises a DeprecationWarning (or the appropriate warning category). This ensures that the deprecation warning is active and doesn't regress in the future.

Suggested change
def test_dbapi_deprecated():
from sqlalchemy_bigquery.base import BigQueryDialect
assert BigQueryDialect.dbapi() is BigQueryDialect.import_dbapi()
def test_dbapi_deprecated():
from sqlalchemy_bigquery.base import BigQueryDialect
with pytest.deprecated_call():
assert BigQueryDialect.dbapi() is BigQueryDialect.import_dbapi()

@ohmayr
ohmayr force-pushed the fix-sqlalchemy-bigquery-geography-bug branch from e41196b to 2102681 Compare July 20, 2026 08:49
@ohmayr
ohmayr force-pushed the chore-sqlalchemy-bigquery-coverage-100 branch from 3757ee2 to 5f11a2e Compare July 20, 2026 08:50
@ohmayr
ohmayr force-pushed the fix-sqlalchemy-bigquery-geography-bug branch from 1ebe446 to 2e4345c Compare July 20, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant