[Checkins] [zopefoundation/zope.testrunner] 75e97b: Automatically enable the default warnings

GitHub noreply at github.com
Fri Nov 10 15:00:25 CET 2017


  Branch: refs/heads/issue54
  Home:   https://github.com/zopefoundation/zope.testrunner
  Commit: 75e97bb06ca42c700b4dfd22e3fa8c2b16148182
      https://github.com/zopefoundation/zope.testrunner/commit/75e97bb06ca42c700b4dfd22e3fa8c2b16148182
  Author: Jason Madden <jamadden at gmail.com>
  Date:   2017-11-10 (Fri, 10 Nov 2017)

  Changed paths:
    M .travis.yml
    M CHANGES.rst
    M setup.py
    M src/zope/testrunner/__init__.py
    M src/zope/testrunner/runner.py
    M src/zope/testrunner/tests/test_runner.py
    M src/zope/testrunner/tests/testrunner-subprocess-errors.txt

  Log Message:
  -----------
  Automatically enable the default warnings

Fixes #54

The handling of the arguments and warnings is directly lifted from
``unittest``.

I introduced a new method, run_tests_with_warnings, that calls the
pre-existing run_tests. In the (unlikely?) event of subclasses that
override run_tests, this will ensure that they get the warnings by
default. It will also allow subclasses to change warning behaviour
without changing test behaviour.

This started producing a bunch of ResourceWarnings under Python 3 for
unclosed files and un-waited-for child process, and that broke a
doctest, so I fixed that in spawn_layer_in_subprocess.




More information about the checkins mailing list