| 1 |
py.test 2.0.2: bug fixes, improved xfail/skip expressions, speed ups |
| 2 |
=========================================================================== |
| 3 |
|
| 4 |
Welcome to pytest-2.0.2, a maintenance and bug fix release of pytest, |
| 5 |
a mature testing tool for Python, supporting CPython 2.4-3.2, Jython |
| 6 |
and latest PyPy interpreters. See the extensive docs with tested examples here: |
| 7 |
|
| 8 |
http://pytest.org/ |
| 9 |
|
| 10 |
If you want to install or upgrade pytest, just type one of:: |
| 11 |
|
| 12 |
pip install -U pytest # or |
| 13 |
easy_install -U pytest |
| 14 |
|
| 15 |
Many thanks to all issue reporters and people asking questions |
| 16 |
or complaining, particularly Jurko for his insistence, |
| 17 |
Laura, Victor and Brianna for helping with improving |
| 18 |
and Ronny for his general advise. |
| 19 |
|
| 20 |
best, |
| 21 |
holger krekel |
| 22 |
|
| 23 |
Changes between 2.0.1 and 2.0.2 |
| 24 |
---------------------------------------------- |
| 25 |
|
| 26 |
- tackle issue32 - speed up test runs of very quick test functions |
| 27 |
by reducing the relative overhead |
| 28 |
|
| 29 |
- fix issue30 - extended xfail/skipif handling and improved reporting. |
| 30 |
If you have a syntax error in your skip/xfail |
| 31 |
expressions you now get nice error reports. |
| 32 |
|
| 33 |
Also you can now access module globals from xfail/skipif |
| 34 |
expressions so that this for example works now:: |
| 35 |
|
| 36 |
import pytest |
| 37 |
import mymodule |
| 38 |
@pytest.mark.skipif("mymodule.__version__[0] == "1") |
| 39 |
def test_function(): |
| 40 |
pass |
| 41 |
|
| 42 |
This will not run the test function if the module's version string |
| 43 |
does not start with a "1". Note that specifying a string instead |
| 44 |
of a boolean expressions allows py.test to report meaningful information |
| 45 |
when summarizing a test run as to what conditions lead to skipping |
| 46 |
(or xfail-ing) tests. |
| 47 |
|
| 48 |
- fix issue28 - setup_method and pytest_generate_tests work together |
| 49 |
The setup_method fixture method now gets called also for |
| 50 |
test function invocations generated from the pytest_generate_tests |
| 51 |
hook. |
| 52 |
|
| 53 |
- fix issue27 - collectonly and keyword-selection (-k) now work together |
| 54 |
Also, if you do "py.test --collectonly -q" you now get a flat list |
| 55 |
of test ids that you can use to paste to the py.test commandline |
| 56 |
in order to execute a particular test. |
| 57 |
|
| 58 |
- fix issue25 avoid reported problems with --pdb and python3.2/encodings output |
| 59 |
|
| 60 |
- fix issue23 - tmpdir argument now works on Python3.2 and WindowsXP |
| 61 |
Starting with Python3.2 os.symlink may be supported. By requiring |
| 62 |
a newer py lib version the py.path.local() implementation acknowledges |
| 63 |
this. |
| 64 |
|
| 65 |
- fixed typos in the docs (thanks Victor Garcia, Brianna Laugher) and particular |
| 66 |
thanks to Laura Creighton who also reviewed parts of the documentation. |
| 67 |
|
| 68 |
- fix slightly wrong output of verbose progress reporting for classes |
| 69 |
(thanks Amaury) |
| 70 |
|
| 71 |
- more precise (avoiding of) deprecation warnings for node.Class|Function accesses |
| 72 |
|
| 73 |
- avoid std unittest assertion helper code in tracebacks (thanks Ronny) |