
And who said you can't teach an old dog new tricks. ... but at the same time, drop Python 3.2 for not knowing this new trick.
13 lines
319 B
Hy
13 lines
319 B
Hy
;; Tests where the emited code relies on Python 3.
|
|
;; Conditionally included in nosetests runs.
|
|
|
|
(import [hy._compat [PY33]])
|
|
(import [hy.errors [HyCompileError]])
|
|
|
|
|
|
|
|
(defn test-exception-cause []
|
|
(try (raise ValueError :from NameError)
|
|
(except [e [ValueError]]
|
|
(assert (= (type (. e __cause__)) NameError)))))
|