Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(34191)

Side by Side Diff: Lib/test/test_bsddb3.py

Issue 5178: Add context manager for temporary directory
Patch Set: Created 8 years, 11 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Lib/test/test_bsddb185.py ('k') | Lib/test/test_commands.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Test driver for bsddb package. 1 # Test driver for bsddb package.
2 """ 2 """
3 Run all test cases. 3 Run all test cases.
4 """ 4 """
5 import os 5 import os
6 import sys 6 import sys
7 import tempfile 7 import tempfile
8 import time 8 import time
9 import unittest 9 import unittest
10 from test.test_support import requires, verbose, run_unittest, unlink, rmtree 10 from test.test_support import requires, verbose, run_unittest
11 11
12 # When running as a script instead of within the regrtest framework, skip the 12 # When running as a script instead of within the regrtest framework, skip the
13 # requires test, since it's obvious we want to run them. 13 # requires test, since it's obvious we want to run them.
14 if __name__ != '__main__': 14 if __name__ != '__main__':
15 requires('bsddb') 15 requires('bsddb')
16 16
17 verbose = False 17 verbose = False
18 if 'verbose' in sys.argv: 18 if 'verbose' in sys.argv:
19 verbose = True 19 verbose = True
20 sys.argv.remove('verbose') 20 sys.argv.remove('verbose')
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 # one lying around. This might be by a different user, so just 67 # one lying around. This might be by a different user, so just
68 # ignore errors. We should always make a unique name now. 68 # ignore errors. We should always make a unique name now.
69 try: 69 try:
70 test_all.remove_test_path_directory() 70 test_all.remove_test_path_directory()
71 except: 71 except:
72 pass 72 pass
73 73
74 74
75 if __name__ == '__main__': 75 if __name__ == '__main__':
76 test_main() 76 test_main()
OLDNEW
« no previous file with comments | « Lib/test/test_bsddb185.py ('k') | Lib/test/test_commands.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+