|
27 | 27 | import stackless
|
28 | 28 |
|
29 | 29 | # you get them by "from stackless import *"
|
30 |
| -DECLARED_API = {# 'bomb': callable, # undocumented in the manual |
31 |
| - 'atomic': type, |
32 |
| - # 'set_error_handler': callable, # undocumented in the manual, debug related |
33 |
| - 'getmain': FUNCTION, |
34 |
| - # 'switch_trap': FUNCTION, debug related |
35 |
| - 'get_thread_info': FUNCTION, |
36 |
| - 'tasklet': type, |
37 |
| - 'stackless': types.ModuleType, |
38 |
| - 'run': FUNCTION, |
39 |
| - 'schedule': FUNCTION, |
40 |
| - 'getruncount': FUNCTION, |
41 |
| - 'schedule_remove': FUNCTION, |
42 |
| - 'getcurrent': FUNCTION, |
43 |
| - # 'enable_softswitch': FUNCTION, depends on the implementation |
44 |
| - 'getcurrentid': FUNCTION, # undocumented in the manual |
45 |
| - 'channel': type, |
46 |
| - } |
| 30 | +DECLARED_API = { # 'bomb': callable, # undocumented in the manual |
| 31 | + 'atomic': type, |
| 32 | + # 'set_error_handler': callable, # undocumented in the manual, debug related |
| 33 | + 'getmain': FUNCTION, |
| 34 | + # 'switch_trap': FUNCTION, debug related |
| 35 | + 'get_thread_info': FUNCTION, |
| 36 | + 'tasklet': type, |
| 37 | + 'stackless': types.ModuleType, |
| 38 | + 'run': FUNCTION, |
| 39 | + 'schedule': FUNCTION, |
| 40 | + 'getruncount': FUNCTION, |
| 41 | + 'schedule_remove': FUNCTION, |
| 42 | + 'getcurrent': FUNCTION, |
| 43 | + # 'enable_softswitch': FUNCTION, depends on the implementation |
| 44 | + # 'getcurrentid': FUNCTION, # undocumented in the manual |
| 45 | + 'channel': type, |
| 46 | +} |
47 | 47 |
|
48 | 48 | # not imported by a "from stackless import *", but provided and documented
|
49 | 49 | ADDITIONAL_API = {"current": stackless.tasklet,
|
@@ -77,10 +77,12 @@ def testTaskletExit(self):
|
77 | 77 | except AttributeError:
|
78 | 78 | self.fail("__builtin__ does not contain TaskletExit")
|
79 | 79 | # Stackless Documentation says so
|
80 |
| - self.assertTrue(issubclass(te, SystemExit), "TaskletExit is not a subclass of SystemExit") |
| 80 | + self.assertTrue( |
| 81 | + issubclass(te, SystemExit), "TaskletExit is not a subclass of SystemExit") |
81 | 82 |
|
82 | 83 | # create the remaining tests dynamically
|
83 |
| - create_type_tests_for_module(locals(), stackless, DECLARED_API, ADDITIONAL_API) |
| 84 | + create_type_tests_for_module( |
| 85 | + locals(), stackless, DECLARED_API, ADDITIONAL_API) |
84 | 86 |
|
85 | 87 |
|
86 | 88 | if __name__ == "__main__":
|
|
0 commit comments