hy/tests/native_tests/extra/reserved.hy
2019-06-04 14:01:59 -04:00

18 lines
531 B
Hy

;; Copyright 2019 the authors.
;; This file is part of Hy, which is free software licensed under the Expat
;; license. See the LICENSE.
(import [hy.extra.reserved [names]])
(defn test-reserved []
(assert (is (type (names)) frozenset))
(assert (in "and" (names)))
(assert (in "False" (names)))
(assert (in "pass" (names)))
(assert (in "class" (names)))
(assert (in "defclass" (names)))
(assert (in "->" (names)))
(assert (in "keyword?" (names)))
(assert (not-in "foo" (names)))
(assert (not-in "hy" (names))))