diff --git a/tests/compilers/test_ast.py b/tests/compilers/test_ast.py index f9d1df3..3350667 100644 --- a/tests/compilers/test_ast.py +++ b/tests/compilers/test_ast.py @@ -38,7 +38,7 @@ def test_ast_bad_type(): "Make sure AST breakage can happen" try: hy_compile("foo") - assert True == False + assert True is False except HyCompileError: pass @@ -72,7 +72,18 @@ def test_ast_non_decoratable(): """ Ensure decorating garbage breaks """ try: hy_compile(tokenize("(decorate-with (foo) (* x x))")) - assert True == False + assert True is False + except TypeError: + pass + + +def test_ast_non_kwapplyable(): + """ Ensure kwapply breaks """ + code = tokenize("(kwapply foo bar)") + code[0][2] = None + try: + hy_compile(code) + assert True is False except TypeError: pass diff --git a/tests/lex/test_lex.py b/tests/lex/test_lex.py index ad087b6..1eb6180 100644 --- a/tests/lex/test_lex.py +++ b/tests/lex/test_lex.py @@ -33,13 +33,13 @@ def test_lex_exception(): """ Ensure tokenize throws a fit on a partial input """ try: objs = tokenize("(foo") - assert True == False + assert True is False except LexException: pass try: objs = tokenize("&foo&") - assert True == False + assert True is False except LexException: pass diff --git a/tests/native_tests/language.hy b/tests/native_tests/language.hy index 07830bf..0cda171 100644 --- a/tests/native_tests/language.hy +++ b/tests/native_tests/language.hy @@ -78,8 +78,8 @@ (defn test-cond [] "NATIVE: test if cond sorta works." (cond - ((= 1 2) (assert (= true false))) - ((is null null) (assert (= true true))))) + ((= 1 2) (assert (is true false))) + ((is null null) (assert (is true true))))) (defn test-index []