summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_dbm.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_dbm.py')
-rwxr-xr-xLib/test/test_dbm.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/Lib/test/test_dbm.py b/Lib/test/test_dbm.py
index 4da0932..6b57efb 100755
--- a/Lib/test/test_dbm.py
+++ b/Lib/test/test_dbm.py
@@ -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()