Skip to content

Commit 5c02f03

Browse files
committed
Improved assertion errors raised by cant.
1 parent 6c93951 commit 5c02f03

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/lib.hy

+4-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@
8585
(with [~e (hy.I.pytest.raises hy.I.simalq/util.CommandError)]
8686
~form)
8787
~@(when msg-check
88-
[`(assert (= (. ~e value args [0]) ~msg-check))])))
88+
[`(assert (= (. ~e value args [0]) ~msg-check) (.format
89+
"Expected CommandError {}; got {}"
90+
(hy.repr (str ~msg-check))
91+
(hy.repr (. ~e value args [0]))))])))
8992

9093

9194
(defn wk [direction-abbr [n-times 1]]

0 commit comments

Comments
 (0)