Fix a hy-repr test for Python 3.7

This commit is contained in:
Kodi Arfer 2018-03-11 16:25:28 -07:00
parent e3058b5cf5
commit cf60dc7a13

View File

@ -3,7 +3,7 @@
;; license. See the LICENSE. ;; license. See the LICENSE.
(import (import
[hy._compat [PY3 PY36]] [hy._compat [PY3 PY36 PY37]]
[math [isnan]] [math [isnan]]
[hy.contrib.hy-repr [hy-repr hy-repr-register]]) [hy.contrib.hy-repr [hy-repr hy-repr-register]])
@ -163,8 +163,8 @@
(setv mo (re.search "b+" "aaaabbbccc")) (setv mo (re.search "b+" "aaaabbbccc"))
(assert (= (hy-repr mo) (assert (= (hy-repr mo)
(.format (.format
#[[<{}.SRE_Match object; :span {} :match "bbb">]] #[[<{} object; :span {} :match "bbb">]]
(. (type mo) __module__) (if PY37 "re.Match" (+ (. (type mo) __module__) ".SRE_Match"))
(if PY3 "(, 4 7)" "(, (int 4) (int 7))"))))) (if PY3 "(, 4 7)" "(, (int 4) (int 7))")))))
(defn test-hy-repr-custom [] (defn test-hy-repr-custom []