Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-108558: Improve sqlite3 row factory tests #108578

Merged
merged 6 commits into from
Aug 29, 2023

Conversation

EddInSverige
Copy link
Contributor

@EddInSverige EddInSverige commented Aug 28, 2023

  • Fix for gh-108558: Add tests for sqlite3.Row.keys(), adding tests for sqlite3.Row.keys() which currently doesn't have any.
  • Make RowFactoryTests less noisy in verbose mode
  • Reduce boilerplate code in RowFactoryTests

@cpython-cla-bot
Copy link

cpython-cla-bot bot commented Aug 28, 2023

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-bot bedevere-bot added the tests Tests in the Lib/test dir label Aug 28, 2023
@bedevere-bot

This comment was marked as off-topic.

@erlend-aasland erlend-aasland enabled auto-merge (squash) August 29, 2023 08:09
@erlend-aasland
Copy link
Contributor

@EddInSverige, thanks for the PR! I took the liberty to make some final adjustments; hope you don't mind :)

@erlend-aasland erlend-aasland changed the title gh-108558: Add tests for sqlite3.Row.keys() gh-108558: Improve sqlite3 row factory tests Aug 29, 2023
@erlend-aasland erlend-aasland linked an issue Aug 29, 2023 that may be closed by this pull request
@erlend-aasland erlend-aasland merged commit 6eaddc1 into python:main Aug 29, 2023
15 checks passed
@miss-islington
Copy link
Contributor

Thanks @EddInSverige for the PR, and @erlend-aasland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 29, 2023
Add test_sqlite_row_keys() to explicitly test sqlite3.Row.keys().

Cleanups:
- Reduce test noise by converting docstrings to regular comments
- Reduce boilerplate code by adding a setUp() method to RowFactoryTests

(cherry picked from commit 6eaddc1)

Co-authored-by: Edward Schauman-Haigh <142528725+EddInSverige@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
@bedevere-bot
Copy link

GH-108615 is a backport of this pull request to the 3.12 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 bug and security fixes label Aug 29, 2023
@bedevere-bot
Copy link

GH-108616 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Aug 29, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 29, 2023
Add test_sqlite_row_keys() to explicitly test sqlite3.Row.keys().

Cleanups:
- Reduce test noise by converting docstrings to regular comments
- Reduce boilerplate code by adding a setUp() method to RowFactoryTests

(cherry picked from commit 6eaddc1)

Co-authored-by: Edward Schauman-Haigh <142528725+EddInSverige@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
@EddInSverige EddInSverige deleted the gh-108558-fix branch August 29, 2023 08:54
erlend-aasland added a commit that referenced this pull request Aug 29, 2023
)

Add test_sqlite_row_keys() to explicitly test sqlite3.Row.keys().

Cleanups:
- Reduce test noise by converting docstrings to regular comments
- Reduce boilerplate code by adding a setUp() method to RowFactoryTests

(cherry picked from commit 6eaddc1)

Co-authored-by: Edward Schauman-Haigh <142528725+EddInSverige@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Yhg1s pushed a commit to Yhg1s/cpython that referenced this pull request Aug 29, 2023
Add test_sqlite_row_keys() to explicitly test sqlite3.Row.keys().

Cleanups:
- Reduce test noise by converting docstrings to regular comments
- Reduce boilerplate code by adding a setUp() method to RowFactoryTests

(cherry picked from commit 6eaddc1)

Co-authored-by: Edward Schauman-Haigh <142528725+EddInSverige@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Yhg1s pushed a commit that referenced this pull request Aug 29, 2023
)

* gh-108558: Improve sqlite3 row factory tests (GH-108578)

Add test_sqlite_row_keys() to explicitly test sqlite3.Row.keys().

Cleanups:
- Reduce test noise by converting docstrings to regular comments
- Reduce boilerplate code by adding a setUp() method to RowFactoryTests

(cherry picked from commit 6eaddc1)

Co-authored-by: Edward Schauman-Haigh <142528725+EddInSverige@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>

* Fix backport

---------

Co-authored-by: Edward Schauman-Haigh <142528725+EddInSverige@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add explicit test for sqlite3.Row.keys()
4 participants