2010-01-18 23:18:59 +08:00
|
|
|
py.test/pylib 1.2.0: junitxml, standalone test scripts, pluginization
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
py.test is an advanced automated testing tool working with
|
|
|
|
Python2, Python3 and Jython versions on all major operating
|
2010-07-27 03:15:15 +08:00
|
|
|
systems. It has a simple plugin architecture and can run many
|
|
|
|
existing common Python test suites without modification. It offers
|
|
|
|
some unique features not found in other testing tools.
|
2010-01-18 23:18:59 +08:00
|
|
|
See http://pytest.org for more info.
|
|
|
|
|
|
|
|
py.test 1.2.0 brings many bug fixes and interesting new abilities:
|
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
* --junitxml=path will create an XML file for use with CI processing
|
|
|
|
* --genscript=path creates a standalone py.test-equivalent test-script
|
2010-01-18 23:18:59 +08:00
|
|
|
* --ignore=path prevents collection of anything below that path
|
|
|
|
* --confcutdir=path only lookup conftest.py test configs below that path
|
2010-07-27 03:15:15 +08:00
|
|
|
* a 'pytest_report_header' hook to add info to the terminal report header
|
2010-01-19 00:00:22 +08:00
|
|
|
* a 'pytestconfig' function argument gives direct access to option values
|
2010-07-27 03:15:15 +08:00
|
|
|
* 'pytest_generate_tests' can now be put into a class as well
|
2010-01-19 00:00:22 +08:00
|
|
|
* on CPython py.test additionally installs as "py.test-VERSION", on
|
|
|
|
Jython as py.test-jython and on PyPy as py.test-pypy-XYZ
|
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
Apart from many bug fixes 1.2.0 also has better pluginization:
|
2010-01-19 00:00:22 +08:00
|
|
|
Distributed testing and looponfailing testing now live in the
|
|
|
|
separately installable 'pytest-xdist' plugin. The same is true for
|
|
|
|
'pytest-figleaf' for doing coverage reporting. Those two plugins
|
2010-07-27 03:15:15 +08:00
|
|
|
can serve well now as blue prints for doing your own.
|
2010-01-18 23:18:59 +08:00
|
|
|
|
|
|
|
thanks to all who helped and gave feedback,
|
|
|
|
have fun,
|
|
|
|
|
|
|
|
holger krekel, January 2010
|
|
|
|
|
|
|
|
Changes between 1.2.0 and 1.1.1
|
|
|
|
=====================================
|
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
- moved dist/looponfailing from py.test core into a new
|
2010-01-18 23:18:59 +08:00
|
|
|
separately released pytest-xdist plugin.
|
|
|
|
|
|
|
|
- new junitxml plugin: --junitxml=path will generate a junit style xml file
|
2010-07-27 03:15:15 +08:00
|
|
|
which is processable e.g. by the Hudson CI system.
|
2010-01-18 23:18:59 +08:00
|
|
|
|
|
|
|
- new option: --genscript=path will generate a standalone py.test script
|
2010-07-27 03:15:15 +08:00
|
|
|
which will not need any libraries installed. thanks to Ralf Schmitt.
|
2010-01-18 23:18:59 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
- new option: --ignore will prevent specified path from collection.
|
|
|
|
Can be specified multiple times.
|
2010-01-18 23:18:59 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
- new option: --confcutdir=dir will make py.test only consider conftest
|
|
|
|
files that are relative to the specified dir.
|
2010-01-18 23:18:59 +08:00
|
|
|
|
|
|
|
- new funcarg: "pytestconfig" is the pytest config object for access
|
2010-07-27 03:15:15 +08:00
|
|
|
to command line args and can now be easily used in a test.
|
2010-01-18 23:18:59 +08:00
|
|
|
|
|
|
|
- install 'py.test' and `py.which` with a ``-$VERSION`` suffix to
|
2010-07-27 03:15:15 +08:00
|
|
|
disambiguate between Python3, python2.X, Jython and PyPy installed versions.
|
2010-01-18 23:18:59 +08:00
|
|
|
|
|
|
|
- new "pytestconfig" funcarg allows access to test config object
|
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
- new "pytest_report_header" hook can return additional lines
|
|
|
|
to be displayed at the header of a test run.
|
2010-01-18 23:18:59 +08:00
|
|
|
|
|
|
|
- (experimental) allow "py.test path::name1::name2::..." for pointing
|
|
|
|
to a test within a test collection directly. This might eventually
|
2010-07-27 03:15:15 +08:00
|
|
|
evolve as a full substitute to "-k" specifications.
|
2010-01-18 23:18:59 +08:00
|
|
|
|
|
|
|
- streamlined plugin loading: order is now as documented in
|
2010-07-27 03:15:15 +08:00
|
|
|
customize.html: setuptools, ENV, commandline, conftest.
|
2010-01-18 23:18:59 +08:00
|
|
|
also setuptools entry point names are turned to canonical namees ("pytest_*")
|
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
- automatically skip tests that need 'capfd' but have no os.dup
|
2010-01-18 23:18:59 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
- allow pytest_generate_tests to be defined in classes as well
|
2010-01-18 23:18:59 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
- deprecate usage of 'disabled' attribute in favour of pytestmark
|
2010-01-18 23:18:59 +08:00
|
|
|
- deprecate definition of Directory, Module, Class and Function nodes
|
|
|
|
in conftest.py files. Use pytest collect hooks instead.
|
|
|
|
|
|
|
|
- collection/item node specific runtest/collect hooks are only called exactly
|
|
|
|
on matching conftest.py files, i.e. ones which are exactly below
|
|
|
|
the filesystem path of an item
|
|
|
|
|
|
|
|
- change: the first pytest_collect_directory hook to return something
|
|
|
|
will now prevent further hooks to be called.
|
|
|
|
|
|
|
|
- change: figleaf plugin now requires --figleaf to run. Also
|
|
|
|
change its long command line options to be a bit shorter (see py.test -h).
|
|
|
|
|
|
|
|
- change: pytest doctest plugin is now enabled by default and has a
|
2010-07-27 03:15:15 +08:00
|
|
|
new option --doctest-glob to set a pattern for file matches.
|
2010-01-18 23:18:59 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
- change: remove internal py._* helper vars, only keep py._pydir
|
2010-01-18 23:18:59 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
- robustify capturing to survive if custom pytest_runtest_setup
|
|
|
|
code failed and prevented the capturing setup code from running.
|
2010-01-18 23:18:59 +08:00
|
|
|
|
|
|
|
- make py.test.* helpers provided by default plugins visible early -
|
|
|
|
works transparently both for pydoc and for interactive sessions
|
2010-07-27 03:15:15 +08:00
|
|
|
which will regularly see e.g. py.test.mark and py.test.importorskip.
|
2010-01-18 23:18:59 +08:00
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
- simplify internal plugin manager machinery
|
2010-01-18 23:18:59 +08:00
|
|
|
- simplify internal collection tree by introducing a RootCollector node
|
|
|
|
|
|
|
|
- fix assert reinterpreation that sees a call containing "keyword=..."
|
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
- fix issue66: invoke pytest_sessionstart and pytest_sessionfinish
|
|
|
|
hooks on slaves during dist-testing, report module/session teardown
|
2010-01-18 23:18:59 +08:00
|
|
|
hooks correctly.
|
|
|
|
|
2010-07-27 03:15:15 +08:00
|
|
|
- fix issue65: properly handle dist-testing if no
|
|
|
|
execnet/py lib installed remotely.
|
2010-01-18 23:18:59 +08:00
|
|
|
|
|
|
|
- skip some install-tests if no execnet is available
|
|
|
|
|
|
|
|
- fix docs, fix internal bin/ script generation
|
|
|
|
|