2016-12-14 18:21:57 +01:00
|
|
|
from . import (
|
|
|
|
basic,
|
|
|
|
calc,
|
|
|
|
empty_return,
|
|
|
|
morespace,
|
|
|
|
strange_chars,
|
|
|
|
operators,
|
2016-12-15 20:02:04 +01:00
|
|
|
unary,
|
2016-12-14 18:21:57 +01:00
|
|
|
array_access,
|
|
|
|
parens,
|
|
|
|
assignments,
|
|
|
|
comments,
|
|
|
|
precedence,
|
|
|
|
call,
|
|
|
|
getfield,
|
|
|
|
branch,
|
|
|
|
switch,
|
|
|
|
for_loop,
|
|
|
|
for_empty,
|
|
|
|
for_in,
|
|
|
|
do_loop,
|
|
|
|
while_loop,
|
|
|
|
label,
|
|
|
|
func_expr,
|
|
|
|
object_literal,
|
|
|
|
try_statement,
|
|
|
|
with_statement,
|
|
|
|
debug,
|
|
|
|
unshift
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2016-12-15 20:02:04 +01:00
|
|
|
modules = [basic, calc, empty_return, morespace, strange_chars, operators, unary, array_access, parens, assignments,
|
|
|
|
comments, precedence, call, getfield, branch, switch, for_loop, for_empty, for_in, do_loop, while_loop,
|
|
|
|
label, func_expr, object_literal, try_statement, with_statement, debug, unshift]
|
2016-12-14 18:21:57 +01:00
|
|
|
|
|
|
|
|
|
|
|
def gettestcases():
|
|
|
|
for module in modules:
|
|
|
|
if hasattr(module, 'tests'):
|
2016-12-15 20:02:04 +01:00
|
|
|
case = {'name': module.__name__[len(__name__) + 1:], 'subtests': [], 'skip': {}}
|
2016-12-14 18:21:57 +01:00
|
|
|
for test in getattr(module, 'tests'):
|
|
|
|
if 'code' in test:
|
|
|
|
case['subtests'].append(test)
|
|
|
|
if hasattr(module, 'skip'):
|
|
|
|
case['skip'] = getattr(module, 'skip')
|
|
|
|
yield case
|