Author: Ronny Pfannschmidt <[email protected]>
Branch: pytest
Changeset: r53117:cea99ad451e6
Date: 2012-03-02 17:04 +0100
http://bitbucket.org/pypy/pypy/changeset/cea99ad451e6/
Log: testrunner: only do the monkeypatching in scratchbox if its required
diff --git a/testrunner/scratchbox_runner.py b/testrunner/scratchbox_runner.py
--- a/testrunner/scratchbox_runner.py
+++ b/testrunner/scratchbox_runner.py
@@ -14,14 +14,14 @@
def dry_run_scratchbox(args, cwd, out, timeout=None):
return dry_run(args_for_scratchbox(cwd, args), cwd, out, timeout)
-import runner
-# XXX hack hack hack
-dry_run = runner.dry_run
-run = runner.run
+if __name__ == '__main__':
+ import runner
+ # XXX hack hack hack
+ dry_run = runner.dry_run
+ run = runner.run
-runner.dry_run = dry_run_scratchbox
-runner.run = run_scratchbox
+ runner.dry_run = dry_run_scratchbox
+ runner.run = run_scratchbox
-if __name__ == '__main__':
import sys
runner.main(sys.argv)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit