[issue1960] test_gdbm.py converted to unittest

Giampaolo Rodola' report at bugs.python.org
Wed Jan 30 03:51:34 CET 2008


Giampaolo Rodola' added the comment:

Updated version in attachment. 
Changes:

- Added "if self.g is not None: self.g.close()" clause in tearDown.
- Used "test.test_support.unlink(filename)" instead of the try/except
statement.
- Added tests for the flag clause in the open() statement by trying all
supported mode flags. I also called the method "test_flags" instead of
"test_modes" since "mode" is a kwarg for open().
- Added tests for trying to open non existing database with flag == 'r'
and 'w'.

Untested methods which are now tested:
- keys().
- firstkey().
- nextkey().
- reorganize()

The only method currently not tested yet is sync(). I'm not sure how to
test it, maybe I'm misunderstanding its purpose.

Added file: http://bugs.python.org/file9322/test_gdbm.diff

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1960>
__________________________________


More information about the Python-bugs-list mailing list