From a3e388a73a4ef6b712c442c4147633322790b80d Mon Sep 17 00:00:00 2001 From: Aly Sivji Date: Fri, 3 Aug 2018 10:28:46 -0500 Subject: [PATCH] Improve changelog --- changelog/3632.feature.rst | 2 +- src/_pytest/assertion/util.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog/3632.feature.rst b/changelog/3632.feature.rst index a715288e1..023fa3607 100644 --- a/changelog/3632.feature.rst +++ b/changelog/3632.feature.rst @@ -1 +1 @@ -Richer comparison introspection on ``AssertionError`` for objects created using `attrs `_ or `dataclasses `_ (Python 3.7+). +Richer equality comparison introspection on ``AssertionError`` for objects created using `attrs `_ or `dataclasses `_ (Python 3.7+, `backported to Python 3.6 `_). diff --git a/src/_pytest/assertion/util.py b/src/_pytest/assertion/util.py index ac83f6000..4536cd0dd 100644 --- a/src/_pytest/assertion/util.py +++ b/src/_pytest/assertion/util.py @@ -333,7 +333,7 @@ def _compare_eq_class(left, right, verbose, type=None): all_fields = left.__attrs_attrs__ fields_to_check = [field.name for field in all_fields if field.cmp] else: - raise RuntimeError + raise RuntimeError("Unexpected value for `type` paramater") same = [] diff = []