From 277469dfe178453d2077477ecd15f9ea8083d396 Mon Sep 17 00:00:00 2001 From: Kodi Arfer Date: Wed, 13 Sep 2017 13:30:54 -0700 Subject: [PATCH] Add xfail test of #1390 (statements in `assert`) --- tests/native_tests/language.hy | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/native_tests/language.hy b/tests/native_tests/language.hy index 1f069af..d8f4e69 100644 --- a/tests/native_tests/language.hy +++ b/tests/native_tests/language.hy @@ -1592,3 +1592,14 @@ "Make sure argument destructuring works" (defn f [[a b] [c]] (, a b c)) (assert (= (f [1 2] [3]) (, 1 2 3)))) + +#@(pytest.mark.xfail +(defn test-assert-multistatements [] + ; https://github.com/hylang/hy/issues/1390 + (setv s (set)) + (defn f [x] + (.add s x) + False) + (with [(pytest.raises AssertionError)] + (assert (do (f 1) (f 2)) (do (f 3) (f 4)))) + (assert (= s #{1 2 3 4}))))