~pythonregexp2.7/python/issue2636

« back to all changes in this revision

Viewing changes to Lib/bsddb/test/test_all.py

  • Committer: Jeffrey C. "The TimeHorse" Jacobs
  • Date: 2008-06-09 14:36:32 UTC
  • mfrom: (39021.1.402 Regexp-2.6)
  • Revision ID: darklord@timehorse.com-20080609143632-wwwkx92u1t5l7yd3
Merged in changes from the latest python source snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
    return path
68
68
 
69
69
 
70
 
get_new_path.prefix="/tmp/z-Berkeley_DB"
 
70
# This path can be overriden via "set_test_path_prefix()".
 
71
import os, os.path
 
72
get_new_path.prefix=os.path.join(os.sep,"tmp","z-Berkeley_DB")
71
73
get_new_path.num=0
72
74
 
 
75
def get_test_path_prefix() :
 
76
    return get_new_path.prefix
 
77
 
 
78
def set_test_path_prefix(path) :
 
79
    get_new_path.prefix=path
 
80
 
 
81
def remove_test_path_directory() :
 
82
    test_support.rmtree(get_new_path.prefix)
 
83
 
73
84
try :
74
85
    import threading
75
86
    get_new_path.mutex=threading.Lock()
97
108
test_all.verbose = verbose
98
109
 
99
110
 
100
 
def suite():
101
 
    try:
102
 
        # this is special, it used to segfault the interpreter
103
 
        import test_1413192
104
 
    except:
105
 
        pass
106
 
 
 
111
def suite(module_prefix='', timing_check=None):
107
112
    test_modules = [
108
113
        'test_associate',
109
114
        'test_basics',
 
115
        'test_compare',
110
116
        'test_compat',
111
 
        'test_compare',
 
117
        'test_cursor_pget_bug',
112
118
        'test_dbobj',
113
119
        'test_dbshelve',
114
120
        'test_dbtables',
 
121
        'test_distributed_transactions',
115
122
        'test_early_close',
116
 
        'test_distributed_transactions',
117
 
        'test_replication',
118
123
        'test_get_none',
119
124
        'test_join',
120
125
        'test_lock',
122
127
        'test_pickle',
123
128
        'test_queue',
124
129
        'test_recno',
 
130
        'test_replication',
 
131
        'test_sequence',
125
132
        'test_thread',
126
 
        'test_sequence',
127
 
        'test_cursor_pget_bug',
128
133
        ]
129
134
 
130
135
    alltests = unittest.TestSuite()
131
136
    for name in test_modules:
132
 
        module = __import__(name)
 
137
        #module = __import__(name)
 
138
        # Do it this way so that suite may be called externally via
 
139
        # python's Lib/test/test_bsddb3.
 
140
        module = __import__(module_prefix+name, globals(), locals(), name)
 
141
 
133
142
        alltests.addTest(module.test_suite())
 
143
        if timing_check:
 
144
            alltests.addTest(unittest.makeSuite(timing_check))
134
145
    return alltests
135
146
 
136
147