42 lines
1.2 KiB
Diff
42 lines
1.2 KiB
Diff
From 2d150df7974a4a97ba3cbaec5a838f019882b527 Mon Sep 17 00:00:00 2001
|
|
From: Lumir Balhar <lbalhar@redhat.com>
|
|
Date: Wed, 5 May 2021 10:36:09 +0200
|
|
Subject: [PATCH] Fix tests with Python 3.10
|
|
|
|
---
|
|
tests/test_dunders.py | 3 +--
|
|
tests/test_funcs.py | 2 +-
|
|
2 files changed, 2 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/tests/test_dunders.py b/tests/test_dunders.py
|
|
index 2f1ebab..6afe860 100644
|
|
--- a/tests/test_dunders.py
|
|
+++ b/tests/test_dunders.py
|
|
@@ -622,9 +622,8 @@ class TestAddInit(object):
|
|
with pytest.raises(TypeError) as e:
|
|
C(a=1, b=2)
|
|
|
|
- assert (
|
|
+ assert e.value.args[0].endswith(
|
|
"__init__() got an unexpected keyword argument 'a'"
|
|
- == e.value.args[0]
|
|
)
|
|
|
|
@given(booleans(), booleans())
|
|
diff --git a/tests/test_funcs.py b/tests/test_funcs.py
|
|
index 20e2747..64e3eb7 100644
|
|
--- a/tests/test_funcs.py
|
|
+++ b/tests/test_funcs.py
|
|
@@ -545,7 +545,7 @@ class TestEvolve(object):
|
|
with pytest.raises(TypeError) as e:
|
|
evolve(C(), aaaa=2)
|
|
expected = "__init__() got an unexpected keyword argument 'aaaa'"
|
|
- assert (expected,) == e.value.args
|
|
+ assert e.value.args[0].endswith(expected)
|
|
|
|
def test_validator_failure(self):
|
|
"""
|
|
--
|
|
2.31.1
|
|
|