Changes between 1.3.0 and 1.3.1

New features

  • issue91: introduce new py.test.xfail(reason) helper to imperatively mark a test as expected to fail. Can be used from within setup and test functions. This is useful especially for parametrized tests when certain configurations are expected-to-fail. In this case the declarative approach with the @py.test.mark.xfail cannot be used as it would mark all configurations as xfail.

  • issue102: introduce new --maxfail=NUM option to stop test runs after NUM failures. This is a generalization of the '-x' or '--exitfirst' option which is now equivalent to '--maxfail=1'. Both '-x' and '--maxfail' will now also print a line near the end indicating the Interruption.

  • issue89: allow py.test.mark decorators to be used on classes (class decorators were introduced with python2.6) and also allow to have multiple markers applied at class/module level by specifying a list.

  • improve and refine letter reporting in the progress bar: . pass f failed test s skipped tests (reminder: use for dependency/platform mismatch only) x xfailed test (test that was expected to fail) X xpassed test (test that was expected to fail but passed)

    You can use any combination of 'fsxX' with the '-r' extended reporting option. The xfail/xpass results will show up as skipped tests in the junitxml output - which also fixes issue99.

  • make py.test.cmdline.main() return the exitstatus instead of raising SystemExit and also allow it to be called multiple times. This of course requires that your application and tests are properly teared down and don't have global state.

Fixes / Maintenance

  • improved traceback presentation: - improved and unified reporting for "--tb=short" option - Errors during test module imports are much shorter, (using --tb=short style) - raises shows shorter more relevant tracebacks - --fulltrace now more systematically makes traces longer / inhibits cutting
  • improve support for raises and other dynamically compiled code by manipulating python's linecache.cache instead of the previous rather hacky way of creating custom code objects. This makes it seemlessly work on Jython and PyPy where it previously didn't.
  • fix issue96: make capturing more resilient against Control-C interruptions (involved somewhat substantial refactoring to the underlying capturing functionality to avoid race conditions).
  • fix chaining of conditional skipif/xfail decorators - so it works now as expected to use multiple @py.test.mark.skipif(condition) decorators, including specific reporting which of the conditions lead to skipping.
  • fix issue95: late-import zlib so that it's not required for general py.test startup.
  • fix issue94: make reporting more robust against bogus source code (and internally be more careful when presenting unexpected byte sequences)

Changes between 1.2.1 and 1.3.0

Changes between 1.2.1 and 1.2.0

Changes between 1.2 and 1.1.1

Changes between 1.1.1 and 1.1.0

Changes between 1.1.0 and 1.0.2

Changes between 1.0.1 and 1.0.2

Changes between 1.0.0 and 1.0.1

Changes between 1.0.0b9 and 1.0.0

Changes between 1.0.0b8 and 1.0.0b9

Changes between 1.0.0b7 and 1.0.0b8

Changes between 1.0.0b3 and 1.0.0b7

Changes between 1.0.0b1 and 1.0.0b3

Changes between 0.9.2 and 1.0.0b1

XXX lots of things missing here XXX

Changes between 0.9.1 and 0.9.2

Changes between 0.9.0 and 0.9.1

This is a fairly complete list of changes between 0.9 and 0.9.1, which can serve as a reference for developers.