Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-45500: Rewrite test_dbm#29002

Merged
ambv merged 1 commit into
python:mainpython/cpython:mainfrom
serhiy-storchaka:test_dbmserhiy-storchaka/cpython:test_dbmCopy head branch name to clipboard
Oct 19, 2021
Merged

bpo-45500: Rewrite test_dbm#29002
ambv merged 1 commit into
python:mainpython/cpython:mainfrom
serhiy-storchaka:test_dbmserhiy-storchaka/cpython:test_dbmCopy head branch name to clipboard

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Oct 17, 2021

Copy link
Copy Markdown
Member
  • Generate test classes at import time. It allows to filter them when
    run with unittest. E.g: "./python -m unittest test.test_dbm.TestCase_gnu -v".
  • Create a database class in a new directory which will be removed after
    test. It guarantees that all created files and directories be removed
    and will not conflict with other dbm tests.
  • Restore dbm._defaultmod after tests. Previously it was set to the last
    dbm module (dbm.dumb) which affected other tests.
  • Enable the whichdb test for dbm.dumb.
  • Move test_keys to the correct test class. It does not test whichdb().
  • Remove some outdated code and comments.

https://bugs.python.org/issue45500

* Generate test classes at import time. It allows to filter them when
  run with unittest. E.g: "./python -m unittest test.test_dbm.TestCase_gnu -v".
* Create a database class in a new directory which will be removed after
  test. It guarantees that all created files and directories be removed
  and will not conflict with other dbm tests.
* Restore dbm._defaultmod after tests. Previously it was set to the last
  dbm module (dbm.dumb) which affected other tests.
* Enable the whichdb test for dbm.dumb.
* Move test_keys to the correct test class. It does not test whichdb().
* Remove some outdated code and comments.
@serhiy-storchaka serhiy-storchaka added tests Tests in the Lib/test dir skip news 🔨 test-with-buildbots Test PR w/ buildbots; report in status section needs backport to 3.10 only security fixes labels Oct 17, 2021
@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @serhiy-storchaka for commit 8c41898 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot added awaiting core review and removed 🔨 test-with-buildbots Test PR w/ buildbots; report in status section labels Oct 17, 2021
@ambv

ambv commented Oct 19, 2021

Copy link
Copy Markdown
Contributor

Gentoo failures unrelated and covered by BPO-45436.

s390x failures are flaky asyncio and a pickle segfault, both of which are obviously unrelated to test_dbm.

@ambv ambv merged commit 975b94b into python:main Oct 19, 2021
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @serhiy-storchaka for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@miss-islington

Copy link
Copy Markdown
Contributor

Sorry @serhiy-storchaka and @ambv, I had trouble checking out the 3.10 backport branch.
Please backport using cherry_picker on command line.
cherry_picker 975b94b9de969777218e96a9950c1dab2dab65a0 3.10

@ambv ambv added needs backport to 3.10 only security fixes and removed needs backport to 3.10 only security fixes labels Oct 19, 2021
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @serhiy-storchaka for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@miss-islington

Copy link
Copy Markdown
Contributor

Sorry, @serhiy-storchaka and @ambv, I could not cleanly backport this to 3.10 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 975b94b9de969777218e96a9950c1dab2dab65a0 3.10

ambv pushed a commit to ambv/cpython that referenced this pull request Oct 19, 2021
* Generate test classes at import time. It allows to filter them when
  run with unittest. E.g: "./python -m unittest test.test_dbm.TestCase_gnu -v".
* Create a database class in a new directory which will be removed after
  test. It guarantees that all created files and directories be removed
  and will not conflict with other dbm tests.
* Restore dbm._defaultmod after tests. Previously it was set to the last
  dbm module (dbm.dumb) which affected other tests.
* Enable the whichdb test for dbm.dumb.
* Move test_keys to the correct test class. It does not test whichdb().
* Remove some outdated code and comments..
(cherry picked from commit 975b94b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Oct 19, 2021
@bedevere-bot

Copy link
Copy Markdown

GH-29069 is a backport of this pull request to the 3.10 branch.

ambv added a commit that referenced this pull request Oct 19, 2021
* Generate test classes at import time. It allows to filter them when
  run with unittest. E.g: "./python -m unittest test.test_dbm.TestCase_gnu -v".
* Create a database class in a new directory which will be removed after
  test. It guarantees that all created files and directories be removed
  and will not conflict with other dbm tests.
* Restore dbm._defaultmod after tests. Previously it was set to the last
  dbm module (dbm.dumb) which affected other tests.
* Enable the whichdb test for dbm.dumb.
* Move test_keys to the correct test class. It does not test whichdb().
* Remove some outdated code and comments..
(cherry picked from commit 975b94b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@serhiy-storchaka serhiy-storchaka deleted the test_dbm branch October 19, 2021 20:47
ambv pushed a commit to ambv/cpython that referenced this pull request Oct 19, 2021
* Generate test classes at import time. It allows to filter them when
  run with unittest. E.g: "./python -m unittest test.test_dbm.TestCase_gnu -v".
* Create a database class in a new directory which will be removed after
  test. It guarantees that all created files and directories be removed
  and will not conflict with other dbm tests.
* Restore dbm._defaultmod after tests. Previously it was set to the last
  dbm module (dbm.dumb) which affected other tests.
* Enable the whichdb test for dbm.dumb.
* Move test_keys to the correct test class. It does not test whichdb().
* Remove some outdated code and comments..
(cherry picked from commit 975b94b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
corona10 pushed a commit that referenced this pull request Oct 20, 2021
* Generate test classes at import time. It allows to filter them when
  run with unittest. E.g: "./python -m unittest test.test_dbm.TestCase_gnu -v".
* Create a database class in a new directory which will be removed after
  test. It guarantees that all created files and directories be removed
  and will not conflict with other dbm tests.
* Restore dbm._defaultmod after tests. Previously it was set to the last
  dbm module (dbm.dumb) which affected other tests.
* Enable the whichdb test for dbm.dumb.
* Move test_keys to the correct test class. It does not test whichdb().
* Remove some outdated code and comments..
(cherry picked from commit 975b94b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
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.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.