[3.10] bpo-45500: Rewrite test_dbm (GH-29002) (GH-29069) · python/cpython@325b2c2 · GitHub
Skip to content

Commit 325b2c2

Browse files
[3.10] bpo-45500: Rewrite test_dbm (GH-29002) (GH-29069)
* 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>
1 parent 092ec4b commit 325b2c2

1 file changed

Lines changed: 50 additions & 64 deletions

File tree

Lib/test/test_dbm.py

Lines changed: 50 additions & 64 deletions

0 commit comments

Comments
 (0)