Skip to content

Commit

Permalink
Issue python#133: Fix the Stackless test suite
Browse files Browse the repository at this point in the history
    
Adapt to changes in test.libregrtest
  • Loading branch information
Anselm Kruis committed Oct 7, 2017
1 parent 7c725d1 commit c04b2c8
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions Stackless/unittests/runAll.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,13 @@
# add the stackless unittest dir to the package "test"
test_path.insert(0, path)


def main(tests=None, **kwargs):
kwargs.setdefault("testdir", path)
return libregrtest.main(tests=tests, **kwargs)

def main_in_temp_cwd(tests=None, **kwargs):
kwargs.setdefault("testdir", path)
# unfortunately, libregrtest.main_in_temp_cwd() does not support
# **kwargs. Monkey patch it
mglobals = libregrtest.main_in_temp_cwd.__globals__
real_main = mglobals["main"]
def main():
return real_main(tests, **kwargs)
mglobals["main"] = main
try:
libregrtest.main_in_temp_cwd()
finally:
mglobals["main"] = real_main

if __name__ == '__main__':
main_in_temp_cwd()
main()
import gc
gc.set_debug(gc.DEBUG_UNCOLLECTABLE)

0 comments on commit c04b2c8

Please sign in to comment.