#17082: test_dbm* now work with unittest test discovery. Patch by Zachary Ware.

This commit is contained in:
Ezio Melotti 2013-03-01 11:23:28 +02:00
parent 520378f81d
commit f79493bf9e
5 changed files with 17 additions and 28 deletions

View file

@ -29,9 +29,6 @@ class DumbDBMTestCase(unittest.TestCase):
'\u00fc'.encode('utf-8') : b'!',
}
def __init__(self, *args):
unittest.TestCase.__init__(self, *args)
def test_dumbdbm_creation(self):
f = dumbdbm.open(_fname, 'c')
self.assertEqual(list(f.keys()), [])
@ -195,11 +192,6 @@ class DumbDBMTestCase(unittest.TestCase):
def setUp(self):
_delete_files()
def test_main():
try:
support.run_unittest(DumbDBMTestCase)
finally:
_delete_files()
if __name__ == "__main__":
test_main()
unittest.main()