Remove checks in tests for Python 3.5
This commit is contained in:
parent
0fe7f42efc
commit
85f203ba43
@ -11,7 +11,7 @@
|
||||
pytest)
|
||||
(import sys)
|
||||
|
||||
(import [hy._compat [PY3 PY35 PY37]])
|
||||
(import [hy._compat [PY3 PY37]])
|
||||
|
||||
(defn test-sys-argv []
|
||||
"NATIVE: test sys.argv"
|
||||
@ -1550,7 +1550,7 @@ cee\"} dee" "ey bee\ncee dee"))
|
||||
(defn test-disassemble []
|
||||
"NATIVE: Test the disassemble function"
|
||||
(assert (= (disassemble '(do (leaky) (leaky) (macros))) (cond
|
||||
[PY35 "Module(
|
||||
[PY3 "Module(
|
||||
body=[Expr(value=Call(func=Name(id='leaky'), args=[], keywords=[])),
|
||||
Expr(value=Call(func=Name(id='leaky'), args=[], keywords=[])),
|
||||
Expr(value=Call(func=Name(id='macros'), args=[], keywords=[]))])"]
|
||||
|
@ -2,7 +2,7 @@
|
||||
;; This file is part of Hy, which is free software licensed under the Expat
|
||||
;; license. See the LICENSE.
|
||||
|
||||
(import [hy._compat [PY35]])
|
||||
(import [hy._compat [PY3]])
|
||||
|
||||
(setv square (fn [x]
|
||||
(* x x)))
|
||||
@ -191,7 +191,7 @@
|
||||
|
||||
(defn test-matmul []
|
||||
"NATIVE: test matrix multiplication"
|
||||
(if PY35
|
||||
(if PY3
|
||||
(assert (= (@ first-test-matrix second-test-matrix)
|
||||
product-of-test-matrices))
|
||||
;; Python <= 3.4
|
||||
@ -205,6 +205,6 @@
|
||||
(setv matrix first-test-matrix
|
||||
matmul-attempt (try (@= matrix second-test-matrix)
|
||||
(except [e [Exception]] e)))
|
||||
(if PY35
|
||||
(if PY3
|
||||
(assert (= product-of-test-matrices matrix))
|
||||
(assert (isinstance matmul-attempt NameError))))
|
||||
|
@ -2,7 +2,7 @@
|
||||
;; This file is part of Hy, which is free software licensed under the Expat
|
||||
;; license. See the LICENSE.
|
||||
|
||||
(import pytest [hy._compat [PY35]])
|
||||
(import pytest [hy._compat [PY3]])
|
||||
|
||||
(defmacro op-and-shadow-test [op &rest body]
|
||||
; Creates two tests with the given `body`, one where all occurrences
|
||||
@ -102,7 +102,7 @@
|
||||
(forbid (f 1 2 3)))
|
||||
|
||||
|
||||
(when PY35 (op-and-shadow-test @
|
||||
(when PY3 (op-and-shadow-test @
|
||||
(defclass C [object] [
|
||||
__init__ (fn [self content] (setv self.content content))
|
||||
__matmul__ (fn [self other] (C (+ self.content other.content)))])
|
||||
|
Loading…
Reference in New Issue
Block a user