Skip to content

Commit

Permalink
- Running layers in sub-processes did not use to work when run via
Browse files Browse the repository at this point in the history
  ``python setup.py ftest`` since it tried to run setup.py with all the
  command line options. It now detects ``setup.py`` runs and we run the test
  runner directly.
  • Loading branch information
strichter committed Mar 3, 2013
1 parent d87c776 commit aead11a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CHANGES.rst
Expand Up @@ -4,7 +4,10 @@ zope.testrunner Changelog
4.3.3 (unreleased)
==================

- Nothing changed yet.
- Running layers in sub-processes did not use to work when run via
``python setup.py ftest`` since it tried to run setup.py with all the
command line options. It now detects ``setup.py`` runs and we run the test
runner directly.


4.3.2 (2013-03-03)
Expand Down
4 changes: 4 additions & 0 deletions src/zope/testrunner/runner.py
Expand Up @@ -418,6 +418,10 @@ def spawn_layer_in_subprocess(result, script_parts, options, features,
# BBB
if script_parts is None:
script_parts = sys.argv[0:1]
# If we are running via setup.py, then we'll have to run the
# sub-process differently.
if script_parts[0] == 'setup.py':
script_parts = ['-c', 'from zope.testrunner import run; run()']
args = [sys.executable]
args.extend(script_parts)
args.extend(['--resume-layer', layer_name, str(resume_number)])
Expand Down

0 comments on commit aead11a

Please sign in to comment.