@@ -7,14 +7,15 @@ Helps converting unittest test-cases to pytest
77-----------------------------------------------------
88
99:Author: Hartmut Goebel <
[email protected] >
10- :Version: Version 0.2
10+ :Version: Version 0.3
1111:Copyright: Hartmut Goebel
1212:Licence: GNU Public Licence v3 or later (GPLv3+)
1313:Homepage: https://github.com/pytest-dev/unittest2pytest
1414
1515
16- .. image :: https://secure.travis-ci.org/ pytest-dev/unittest2pytest.png?branch=master
16+ .. image :: https://img.shields.io/travis/ pytest-dev/unittest2pytest/v0.3.svg
1717 :target: https://travis-ci.org/pytest-dev/unittest2pytest/
18+ :alt: Travis CI test status
1819
1920
2021`unittest2pytest ` is a tool that helps rewriting Python `unittest `
@@ -75,8 +76,15 @@ A list of the available fixers can be found with the following::
7576 self_assert
7677
7778
79+ Note: if your tests use the context managers ``with self.assertRaises `` or
80+ ``with self.assertWarns ``, they will be transformed to ``pytest.raises `` or
81+ ``pytest.warns `` appropriately, but because the semantics are different, any
82+ use of the output value from the context managers (e.g. the ``x `` in
83+ ``with pytest.raises(ValueError) as x: ``) will be wrong and will require
84+ manual adjustment after the fact.
85+
7886.. _`lib2to3 documentation` : http://docs.python.org/library/2to3.html
79- .. _pytest : http ://www.python. org/dev/peps/pep-0008 /
87+ .. _pytest : https ://pytest. org/latest /
8088
8189
8290..
0 commit comments