[Checkins] [zopefoundation/z3c.testsetup] 709c49: Add a doctest that works without z.a.testing.

GitHub noreply at github.com
Sat May 9 14:47:58 CEST 2015


  Branch: refs/heads/master
  Home:   https://github.com/zopefoundation/z3c.testsetup
  Commit: 709c4988bfde2920b54603cd36445616b1566ca9
      https://github.com/zopefoundation/z3c.testsetup/commit/709c4988bfde2920b54603cd36445616b1566ca9
  Author: ulif <uli at gnufix.de>
  Date:   2015-05-09 (Sat, 09 May 2015)

  Changed paths:
    A src/z3c/testsetup/tests/setupininit_nonfunctional.txt

  Log Message:
  -----------
  Add a doctest that works without z.a.testing.

This is a stripped-down version of setupininit.txt. It requires that
no working zope.app.testing is installed.

Why another doctest? Turned out, that turning this doctest
('setupininit.txt') into a regular Python test, would be even more
complex. Also conditional doctest parts (i.e.: parts of a doctest file
that are only run if a certain condition is met) seem not to be
possible. At least I found no (easily readable) way to write something
like:

  >>> if cond:
  ...   run_one_test()
  result of run_one_test

  >>> if not cond:
  ...   run_other_test()
  result of run_other_test.

where one of the results would be ignored. Any hints would be welcome.


  Commit: 0c1a6dbc09534518bb826d3be0faad682e4305d8
      https://github.com/zopefoundation/z3c.testsetup/commit/0c1a6dbc09534518bb826d3be0faad682e4305d8
  Author: ulif <uli at gnufix.de>
  Date:   2015-05-09 (Sat, 09 May 2015)

  Changed paths:
    M src/z3c/testsetup/tests/test_testsetup.py

  Log Message:
  -----------
  Conditionally run tests requiring z.a.testing.

Run some tests only if zope.app.testing is *not* available and
working in order to become Py3.x compatible. Now 4 out of 13 tests
remain failing under Python3.


Compare: https://github.com/zopefoundation/z3c.testsetup/compare/bcdecdc13570...0c1a6dbc0953


More information about the checkins mailing list