mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
Add test_main() functions to various tests where it was simple to do. Done so
that regrtest can execute the test_main() directly instead of relying on import side-effects.
This commit is contained in:
parent
963c80fd45
commit
7dbd91811d
9 changed files with 63 additions and 36 deletions
|
@ -43,12 +43,18 @@ def test_modes():
|
|||
d = dbm.open(filename, 'n')
|
||||
d.close()
|
||||
|
||||
cleanup()
|
||||
try:
|
||||
test_keys()
|
||||
test_modes()
|
||||
except:
|
||||
def test_main():
|
||||
cleanup()
|
||||
raise
|
||||
try:
|
||||
test_keys()
|
||||
test_modes()
|
||||
except:
|
||||
cleanup()
|
||||
raise
|
||||
|
||||
cleanup()
|
||||
cleanup()
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue