summaryrefslogtreecommitdiff
path: root/CHANGELOG.rst
diff options
context:
space:
mode:
authorBruno Oliveira <nicoddemus@gmail.com>2019-07-23 08:42:03 -0300
committerBruno Oliveira <nicoddemus@gmail.com>2019-07-23 08:42:03 -0300
commit3c94f32e771532040bb3e003998aedb273805ca7 (patch)
treef121861690a28e729c9cd6ef4c731b086d195953 /CHANGELOG.rst
parent13c4b7d212bd7482104cc7f573c6ed2d5a16fafe (diff)
downloadpytest-3c94f32e771532040bb3e003998aedb273805ca7.tar.gz
Make ExceptionInfo.repr change more prominent
Related to #5579
Diffstat (limited to 'CHANGELOG.rst')
-rw-r--r--CHANGELOG.rst18
1 files changed, 18 insertions, 0 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index f2021c05d..811f7475d 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -90,6 +90,24 @@ Removals
- `#5412 <https://github.com/pytest-dev/pytest/issues/5412>`_: ``ExceptionInfo`` objects (returned by ``pytest.raises``) now have the same ``str`` representation as ``repr``, which
avoids some confusion when users use ``print(e)`` to inspect the object.
+ This means code like:
+
+ .. code-block:: python
+
+ with pytest.raises(SomeException) as e:
+ ...
+ assert "some message" in str(e)
+
+
+ Needs to be changed to:
+
+ .. code-block:: python
+
+ with pytest.raises(SomeException) as e:
+ ...
+ assert "some message" in str(e.value)
+
+
Deprecations