FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test(db_api): increase coverage of db_api by HemangChothani · Pull Request #231 · googleapis/python-spanner · GitHub

This repository was archived by the owner on Jun 8, 2026. It is now read-only.
/ python-spanner Public archive

test(db_api): increase coverage of db_api - #231

Merged
larkee merged 4 commits into
googleapis:masterfrom
MaxxleLLC:spanner_dbapi_coverage
Mar 10, 2021
Merged

larkee merged 4 commits into
googleapis:masterfrom
MaxxleLLC:spanner_dbapi_coverage

Conversation

Copy link
Copy Markdown
Contributor

No description provided.

HemangChothani requested review from a team and larkee February 10, 2021 12:01
google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Feb 10, 2021
product-auto-label Bot added the api: spanner Issues related to the googleapis/python-spanner API. label Feb 10, 2021
larkee changed the title pref: increase coverage of db_api test(db_api): increase coverage of db_api Feb 15, 2021

larkee commented Feb 15, 2021

Copy link
Copy Markdown
Contributor

From the coverage in the Kokoro build:

google/cloud/spanner_dbapi/connection.py      152      2     48      1    98%   305->306, 306-307
google/cloud/spanner_dbapi/cursor.py          188      6     54      4    96%   260->262, 278->280, 281-283, 307->309, 310->312, 312-314

Connection.run_statement() is missing a homogenous insert test.
Cursor.fetchone(), Cursor.fetchall() and Cursor.fetchmany() are missing autocommit=True tests.
Cursor.fetchall() and Cursor.fetchmany() are missing Aborted error tests.
Adding these ~6 tests should bring the coverage to 100%

larkee added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 15, 2021
yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 15, 2021

larkee commented Feb 15, 2021

Copy link
Copy Markdown
Contributor

Disregard the Aborted error and homogenous insert test suggestions. I can see they're added in #228 and #233 respectively.

larkee 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Please rebase this PR

larkee 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM, just need the missing test to be added back in 👍


def test_run_statement_w_heterogenous_insert_statements(self):
"""Check that Connection executed heterogenous insert statements."""
def test_run_statement_w_homogeneous_insert_statements(self):

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It looks like you overwrote test_run_statement_w_heterogenous_insert_statements during the conflict resolution. Please add it back in 👍

larkee merged commit 489ac0a into googleapis:master Mar 10, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: spanner Issues related to the googleapis/python-spanner API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL