py.test-1.3.1: new py.test.xfail, --maxfail, better reporting, fixes

py.test-1.3.1: new py.test.xfail, --maxfail, better reporting, fixes

Post by holger kre » Thu, 27 May 2010 04:15:28


The pylib/py.test 1.3.1 release brings:

- the new imperative ``py.test.xfail()`` helper in order to have a test or
setup function result in an "expected failure"
- a new option ``--maxfail=NUM`` to stop the test run after some failures
- markers/decorators are now applicable to test classes (>=Python2.6)
- improved reporting, shorter tracebacks in several cases
- some simplified internals, more compatibility with Jython and PyPy
- bug fixes and various refinements

See the below CHANGELOG entry below for more details and
http://pylib.org/install.html for installation instructions.

If you used older versions of py.test you should be able to upgrade
to 1.3.1 without changes to your test source code.

py.test is an automated testing tool working with Python2, Python3,
Jython and PyPy versions on all major operating systems. It
offers a no-boilerplate testing approach and has inspired other testing
tools and enhancements in the standard Python library for more than five
years. It has a simple and extensive plugin architecture, configurable
reporting and provides unique ways to make it fit to your testing
process and needs.

See http://pytest.org for more info.

cheers and have fun,

holger krekel

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'
 
 
 

1. py lib 0.9.0: py.test, distributed execution, microthreads ...

2. ANN: py lib 0.9.0: py.test, distributed execution, microthreads ...

py lib 0.9.0: py.test, distributed execution, greenlets and more
======================================================================

Welcome to the 0.9.0 py lib release - a library aiming to
support agile and test-driven python development on various levels.

Main API/Tool Features:

* py.test: cross-project testing tool with many advanced features
* py.execnet: ad-hoc code distribution to SSH, Socket and local sub processes
* py.magic.greenlet: micro-threads on standard CPython ("stackless-light")
* py.path: path abstractions over local and subversion files
* rich documentation of py's exported API
* tested against Linux, OSX and partly against Win32, python 2.3-2.5

All these features and their API have extensive documentation,
generated with the new "apigen", which we intend to make accessible
for other python projects as well.

Download/Install: http://www.yqcomputer.com/
Documentation/API: http://www.yqcomputer.com/

Work on the py lib has been partially funded by the
European Union IST programme and by http://www.yqcomputer.com/
within the PyPy project.

best, have fun and let us know what you think!

Holger Krekel, Maciej Fijalkowski,
Guido Wesdorp, Carl Friedrich Bolz

3. Where to I find files: gtk.py _gtk.py and GDK.py

4. Announcing atomfeed.py, xmlelements.py, and feedutils.py

5. Where to I find files: gtk.py _gtk.py and GDK.py

6. pylib/py.test 1.3.4: fixes and new native traceback option

7. ANN: oejskit 0.9.0 JavaScript in-browser testing, now with py.test 2.0 support

8. What's a good XSL to translate xmlrunner.py output into a test report?

9. [py-dev] tox, a new generic virtualenv/test management tool

10. tox-0.8 and py.test-1.3.3 released

11. python 1.5.2 cgi.py and os.py error

12. .Py ***Hot stuff - check this out !!! .Py

13. to py or not to py ?

14. Importing bitly.py in twitter-gedit.py

15. Py is Dead! Long live Py!