Remove pytest.deprecated_call() in TestAssoc::test_unknown (#1249)
assoc() no longer raises a deprecation warning since commit
22ae8473fb
but the 'with
pytest.deprecated_call():' in that test was not removed then (in
contrast with other test cases).
Maybe this got unnoticed due to a pytest bug?
In any case, using pytest 8+ (and keeping deprecated_call()) shows that
no warning is raised and the test fails.
Removing the upper bound on pytest in dev dependencies as tests now
pass with pytest 8.0.
Fix #1233.
Co-authored-by: Hynek Schlawack <hs@ox.cx>
This commit is contained in:
parent
3eab45c5d8
commit
b9084fab02
|
@ -41,8 +41,7 @@ tests-no-zope = [
|
|||
"hypothesis",
|
||||
"pympler",
|
||||
# 4.3.0 dropped last use of `convert`
|
||||
# 8.0 broke something around warnings/exceptions
|
||||
"pytest>=4.3.0,<8.0",
|
||||
"pytest>=4.3.0",
|
||||
"pytest-xdist[psutil]",
|
||||
"attrs[tests-mypy]",
|
||||
]
|
||||
|
|
|
@ -600,9 +600,7 @@ class TestAssoc:
|
|||
AttrsAttributeNotFoundError.
|
||||
"""
|
||||
# No generated class will have a four letter attribute.
|
||||
with pytest.raises(
|
||||
AttrsAttributeNotFoundError
|
||||
) as e, pytest.deprecated_call():
|
||||
with pytest.raises(AttrsAttributeNotFoundError) as e:
|
||||
assoc(C(), aaaa=2)
|
||||
|
||||
assert (f"aaaa is not an attrs attribute on {C!r}.",) == e.value.args
|
||||
|
|
Loading…
Reference in New Issue