Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit c04b2c8

Browse files
author
Anselm Kruis
committed
Issue #133: Fix the Stackless test suite
Adapt to changes in test.libregrtest
1 parent 7c725d1 commit c04b2c8

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

Stackless/unittests/runAll.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,13 @@
2121
# add the stackless unittest dir to the package "test"
2222
test_path.insert(0, path)
2323

24+
2425
def main(tests=None, **kwargs):
2526
kwargs.setdefault("testdir", path)
2627
return libregrtest.main(tests=tests, **kwargs)
2728

28-
def main_in_temp_cwd(tests=None, **kwargs):
29-
kwargs.setdefault("testdir", path)
30-
# unfortunately, libregrtest.main_in_temp_cwd() does not support
31-
# **kwargs. Monkey patch it
32-
mglobals = libregrtest.main_in_temp_cwd.__globals__
33-
real_main = mglobals["main"]
34-
def main():
35-
return real_main(tests, **kwargs)
36-
mglobals["main"] = main
37-
try:
38-
libregrtest.main_in_temp_cwd()
39-
finally:
40-
mglobals["main"] = real_main
4129

4230
if __name__ == '__main__':
43-
main_in_temp_cwd()
31+
main()
4432
import gc
4533
gc.set_debug(gc.DEBUG_UNCOLLECTABLE)

0 commit comments

Comments
 (0)