Skip to content

Commit

Permalink
Better string formatting in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
odelalleau committed Mar 5, 2021
1 parent 5508f90 commit 93f76ce
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions tests/test_interpolation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import copy
import random
import re
from textwrap import dedent
from typing import Any, Optional, Tuple

import pytest
Expand Down Expand Up @@ -844,7 +845,12 @@ def drop_last(s: str) -> str:
pytest.raises(
ValidationError,
match=re.escape(
"Value 'seven' could not be converted to Integer\n full_key: age"
dedent(
"""\
Value 'seven' could not be converted to Integer
full_key: age
"""
)
),
),
id="type_mismatch_resolver",
Expand All @@ -855,7 +861,12 @@ def drop_last(s: str) -> str:
pytest.raises(
ValidationError,
match=re.escape(
"Value 'Bond' could not be converted to Integer\n full_key: age"
dedent(
"""\
Value 'Bond' could not be converted to Integer
full_key: age
"""
)
),
),
id="type_mismatch_node_interpolation",
Expand Down

0 comments on commit 93f76ce

Please sign in to comment.