Skip to content

Commit

Permalink
Escape patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek committed Jul 29, 2023
1 parent a868560 commit d47cf1b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Tests for `attr._funcs`.
"""

import re

from collections import OrderedDict
from typing import Generic, NamedTuple, TypeVar
Expand Down Expand Up @@ -275,7 +276,7 @@ class A:

instance = A(Coordinates(50.419019, 30.516225))

with pytest.raises(TypeError, match=message):
with pytest.raises(TypeError, match=re.escape(message)):
attr.asdict(instance, retain_collection_types=True)


Expand Down Expand Up @@ -479,7 +480,7 @@ class A:

instance = A(Coordinates(50.419019, 30.516225))

with pytest.raises(TypeError, match=message):
with pytest.raises(TypeError, match=re.escape(message)):
attr.astuple(instance, retain_collection_types=True)


Expand Down

0 comments on commit d47cf1b

Please sign in to comment.