53 |
fn = getattr(module, test) |
fn = getattr(module, test) |
54 |
|
|
55 |
if not fn.__doc__: |
if not fn.__doc__: |
56 |
name = test |
name = '%s.%s' % (module.__name__, test) |
57 |
else: |
else: |
58 |
lines = fn.__doc__.split('\n') |
lines = fn.__doc__.split('\n') |
59 |
if lines[0] == '': |
if lines[0] == '': |
60 |
name = '%s (%s)' % (test, lines[1].strip()) |
name = '%s.%s (%s)' % (module.__name__, test, |
61 |
|
lines[1].strip()) |
62 |
else: |
else: |
63 |
name = '%s (%s)' % (test, lines[0].strip()) |
name = '%s.%s (%s)' % (module.__name__, test, |
64 |
|
lines[0].strip()) |
65 |
|
|
66 |
print name + "... ", |
print name + "... ", |
67 |
|
|
104 |
|
|
105 |
|
|
106 |
def load(file): |
def load(file): |
107 |
name = os.path.splitext(os.path.basename(file))[0] |
name = os.path.splitext(file)[0] |
108 |
|
name = '.'.join(name.split('/')) |
109 |
|
name = '.'.join(name.split('\\')) |
110 |
|
|
111 |
module = imp.new_module(name) |
module = imp.new_module(name) |
112 |
execfile(file, module.__dict__) |
execfile(file, module.__dict__) |
136 |
|
|
137 |
def main(args): |
def main(args): |
138 |
global runfail |
global runfail |
139 |
runfail = [] |
runfail = [None] |
140 |
|
|
141 |
opts, args = getopt.getopt(args, |
opts, args = getopt.getopt(args, |
142 |
org.fenfire.test.dbg.short + "f:", |
org.fenfire.test.dbg.short + "f:", |
167 |
|
|
168 |
print |
print |
169 |
|
|
170 |
for exc in exceptions: |
for exc in exceptions: |
|
print 75 * '-' |
|
|
traceback.print_exception(*exc['exception']) |
|
|
|
|
171 |
print 75 * '-' |
print 75 * '-' |
172 |
print |
traceback.print_exception(*exc['exception']) |
173 |
print "%s test failures." % len(exceptions) |
|
174 |
|
print 75 * '-' |
175 |
|
print |
176 |
|
print "%s test failures." % len(exceptions) |
177 |
|
|
178 |
java.lang.System.exit(exceptions != []) |
java.lang.System.exit(exceptions != []) |
179 |
|
|
180 |
gzz.client.GraphicsAPI.getInstance().startUpdateManager(Starter(dirs)) |
gzz.client.GraphicsAPI.getInstance().startUpdateManager(Starter(dirs)) |
181 |
|
|