From 1184db827373822863fe936b3027b225cb77ed02 Mon Sep 17 00:00:00 2001 From: Aly Sivji Date: Thu, 2 Aug 2018 18:22:15 -0500 Subject: [PATCH] cleaning up --- changelog/3632.feature.rst | 2 +- testing/test_assertion.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/changelog/3632.feature.rst b/changelog/3632.feature.rst index bb7918ab7..a08a6dd61 100644 --- a/changelog/3632.feature.rst +++ b/changelog/3632.feature.rst @@ -1 +1 @@ -Provide richer comparison on ``AssertionError`` for objects created using `dataclasses `_ (Python 3.7+) or `attrs package `_. +Richer comparison information on ``AssertionError`` for objects created using `attrs `_ or `dataclasses `_ (Python 3.7+). diff --git a/testing/test_assertion.py b/testing/test_assertion.py index 87f7de2b5..e7f3dbaf3 100644 --- a/testing/test_assertion.py +++ b/testing/test_assertion.py @@ -585,6 +585,7 @@ class TestAssert_reprcompare_dataclass(object): assert "Omitting" not in lines[1] assert lines[2] == "['field_a']" + @pytest.mark.skipif(sys.version_info < (3, 7), reason="Dataclasses in Python3.7+") def test_dataclasses_with_attribute_comparison_off(self): from dataclasses import dataclass, field @@ -603,6 +604,7 @@ class TestAssert_reprcompare_dataclass(object): for line in lines[2:]: assert "field_b" not in line + @pytest.mark.skipif(sys.version_info < (3, 7), reason="Dataclasses in Python3.7+") def test_comparing_different_data_classes(self): from dataclasses import dataclass