When trying to require
the following macro in another file, the raise
seems to be triggering immediately:
(defmacro assert [a [b True] [message None]]
`(unless (= ~a ~b) (raise (AssertionError (or ~message ~a)))))
This results in an AssertionError: True
.
Steps to reproduce (sometimes works, and sometimes doesn't):
echo '(defmacro assert [a [b True] [message None]] `(unless (= ~a ~b) (raise (AssertionError (or ~message ~a)))))' > a.hy
echo '(require a [assert])' > b.hy
echo '(assert True)' >> b.hy
hy b.hy