48 lines
1.2 KiB
Python
Raw Normal View History

2016-12-14 18:21:57 +01:00
from . import (
2016-12-29 01:04:08 +01:00
array_access,
assignments,
2016-12-14 18:21:57 +01:00
basic,
2016-12-29 01:04:08 +01:00
branch,
2016-12-14 18:21:57 +01:00
calc,
2016-12-29 01:04:08 +01:00
call,
comments,
debug,
do_loop,
2016-12-14 18:21:57 +01:00
empty_return,
2016-12-29 01:04:08 +01:00
for_empty,
for_in,
for_loop,
func_expr,
getfield,
label,
2016-12-14 18:21:57 +01:00
morespace,
2016-12-29 01:04:08 +01:00
object_literal,
2016-12-14 18:21:57 +01:00
operators,
parens,
precedence,
2016-12-29 01:04:08 +01:00
strange_chars,
2016-12-14 18:21:57 +01:00
switch,
try_statement,
2016-12-29 01:04:08 +01:00
unary,
unshift,
while_loop,
with_statement
2016-12-14 18:21:57 +01:00
)
2016-12-29 01:04:08 +01:00
modules = [array_access, assignments, basic, branch, calc, call, comments, debug, do_loop, empty_return, for_empty,
for_in, for_loop, func_expr, getfield, label, morespace, object_literal, operators, parens, precedence,
strange_chars, switch, try_statement, unary, unshift, while_loop, with_statement]
2016-12-14 18:21:57 +01:00
def gettestcases():
for module in modules:
if hasattr(module, 'tests'):
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