[Checkins] [zopefoundation/zope.testrunner] 6f4268: Do not be silent if a layer goes missing

GitHub noreply at github.com
Tue Jun 4 15:22:20 UTC 2013


  Branch: refs/heads/master
  Home:   https://github.com/zopefoundation/zope.testrunner
  Commit: 6f42681154fb97e2586223c8a5dd37e58a69a8c6
      https://github.com/zopefoundation/zope.testrunner/commit/6f42681154fb97e2586223c8a5dd37e58a69a8c6
  Author: Marius Gedminas <marius at gedmin.as>
  Date:   2013-05-29 (Wed, 29 May 2013)

  Changed paths:
    M src/zope/testrunner/filter.py

  Log Message:
  -----------
  Do not be silent if a layer goes missing

When we run some test layers in a subprocess (e.g. when you use
zope-testrunner -j2), each subprocess crawls the --test-path to find the
tests again.

If the --test-path is a relative pathname, and the parent process
changes the working directory during the test run, this will cause the
child process to fail to find the tests.  That is an error, and it
shouldn't be silently ignored.

This change needs automated tests!  I only tested it manually (and my
working directory has other uncommitted changes).


  Commit: d26f86fb0ea5baae08f43f6196790982595822a9
      https://github.com/zopefoundation/zope.testrunner/commit/d26f86fb0ea5baae08f43f6196790982595822a9
  Author: Marius Gedminas <marius at gedmin.as>
  Date:   2013-05-29 (Wed, 29 May 2013)

  Changed paths:
    M src/zope/testrunner/__init__.py
    M src/zope/testrunner/runner.py

  Log Message:
  -----------
  Fix subprocess execution when tests change the working directory

Fixes issue #6.

Note that most people use zope.testrunner via zc.buildout and
zc.recipe.testrunner.  That recipe changes the wrapper script to do two
things:

  sys.argv[0] = os.path.abspath(sys.argv[0])
  os.chdir('/top/of/the/source/tree')

which are exactly what is needed to make test runner subprocesses work
correctly.

Now the standalone zope-testrunner script (what you get when you pip
install zope.testrunner) will do that by itself, and people who use tox
or travis-ci will not be sad.

Note: this change needs unit tests -- I only tested it manually.


  Commit: fbdbc828b508fa9d7bb3e730bb6bb1775eb46649
      https://github.com/zopefoundation/zope.testrunner/commit/fbdbc828b508fa9d7bb3e730bb6bb1775eb46649
  Author: Marius Gedminas <marius at gedmin.as>
  Date:   2013-06-04 (Tue, 04 Jun 2013)

  Changed paths:
    M src/zope/testrunner/tests/test_doctest.py
    A src/zope/testrunner/tests/testrunner-layers-cantfind.txt

  Log Message:
  -----------
  Test for missing layer error reporting


  Commit: 83d25ac7be4e9c0435efe122e32d09fb4aaeb9da
      https://github.com/zopefoundation/zope.testrunner/commit/83d25ac7be4e9c0435efe122e32d09fb4aaeb9da
  Author: Marius Gedminas <marius at gedmin.as>
  Date:   2013-06-04 (Tue, 04 Jun 2013)

  Changed paths:
    M src/zope/testrunner/runner.py
    M src/zope/testrunner/tests/testrunner-layers-buff.txt

  Log Message:
  -----------
  Fix subprocess error reporting on Python 3

Experience shows that subprocess.Popen().stderr.read() returns bytes,
not strings.


  Commit: 0d4b2d6a49e40b36dd809b9c748e59e768f9f5f6
      https://github.com/zopefoundation/zope.testrunner/commit/0d4b2d6a49e40b36dd809b9c748e59e768f9f5f6
  Author: Marius Gedminas <marius at gedmin.as>
  Date:   2013-06-04 (Tue, 04 Jun 2013)

  Changed paths:
    M src/zope/testrunner/runner.py
    M src/zope/testrunner/tests/test_doctest.py
    M src/zope/testrunner/tests/testrunner-layers-buff.txt

  Log Message:
  -----------
  Show command line when subprocess fails


  Commit: 3709e074aff39e66f98734856424b03be762879e
      https://github.com/zopefoundation/zope.testrunner/commit/3709e074aff39e66f98734856424b03be762879e
  Author: Marius Gedminas <marius at gedmin.as>
  Date:   2013-06-04 (Tue, 04 Jun 2013)

  Changed paths:
    M src/zope/testrunner/tests/test_doctest.py
    A src/zope/testrunner/tests/testrunner-ex-6/cwdtests.py
    A src/zope/testrunner/tests/testrunner-layers-cwd.txt

  Log Message:
  -----------
  Add regression test for issue #6


  Commit: 05c36fc65e27945af1fc6e3666e5da33c757a6f4
      https://github.com/zopefoundation/zope.testrunner/commit/05c36fc65e27945af1fc6e3666e5da33c757a6f4
  Author: Marius Gedminas <marius at gedmin.as>
  Date:   2013-06-04 (Tue, 04 Jun 2013)

  Changed paths:
    M src/zope/testrunner/tests/testrunner-layers-cwd.txt

  Log Message:
  -----------
  Clean up after the cwd tests

Lack of this breaks the cprofile test.  (Unless bin/test does the
chdir/abspath combination to work around this.)


  Commit: d8309cf317512965a2471e087e703be04a022b47
      https://github.com/zopefoundation/zope.testrunner/commit/d8309cf317512965a2471e087e703be04a022b47
  Author: Marius Gedminas <marius at gedmin.as>
  Date:   2013-06-04 (Tue, 04 Jun 2013)

  Changed paths:
    M src/zope/testrunner/__init__.py
    M src/zope/testrunner/filter.py
    M src/zope/testrunner/runner.py
    M src/zope/testrunner/tests/test_doctest.py
    A src/zope/testrunner/tests/testrunner-ex-6/cwdtests.py
    M src/zope/testrunner/tests/testrunner-layers-buff.txt
    A src/zope/testrunner/tests/testrunner-layers-cantfind.txt
    A src/zope/testrunner/tests/testrunner-layers-cwd.txt

  Log Message:
  -----------
  Merge pull request #7 from zopefoundation/fix-issue-6

Fix issue 6


Compare: https://github.com/zopefoundation/zope.testrunner/compare/94b860c3e126...d8309cf31751


More information about the checkins mailing list