Skip to content

Commit 699fe9e

Browse files
add debug log for expect_alt
1 parent f83aafa commit 699fe9e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

chaoslib/hypothesis.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,12 @@ def _(tolerance: dict, value: Any, configuration: Configuration = None,
343343
result = values == expect_alt
344344

345345
if result is False:
346-
if "expect" in tolerance:
346+
if "expect" in tolerance and "expect_alt" in tolerance:
347+
logger.debug(
348+
"jsonpath found '{}' but expected '{}' or '{}'".format(
349+
str(values), str(tolerance["expect"]),
350+
str(tolerance["expect_alt"])))
351+
elif "expect" in tolerance:
347352
logger.debug(
348353
"jsonpath found '{}' but expected '{}'".format(
349354
str(values), str(tolerance["expect"])))

0 commit comments

Comments
 (0)