From 8ecb17d1fd8199765bb3b3a8c0526a0b088d37e1 Mon Sep 17 00:00:00 2001 From: Kodi Arfer Date: Sat, 4 Mar 2017 17:04:28 -0800 Subject: [PATCH] Fix bug: quoting a bytestring raises ImportError (#1245) --- hy/__init__.py | 2 +- tests/compilers/native/quoting.hy | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hy/__init__.py b/hy/__init__.py index 8714fd7..aa027da 100644 --- a/hy/__init__.py +++ b/hy/__init__.py @@ -26,7 +26,7 @@ except ImportError: __version__ = 'unknown' -from hy.models import HyExpression, HyInteger, HyKeyword, HyComplex, HyString, HySymbol, HyFloat, HyDict, HyList, HySet, HyCons # NOQA +from hy.models import HyExpression, HyInteger, HyKeyword, HyComplex, HyString, HyBytes, HySymbol, HyFloat, HyDict, HyList, HySet, HyCons # NOQA import hy.importer # NOQA diff --git a/tests/compilers/native/quoting.hy b/tests/compilers/native/quoting.hy index 477e237..c74bb5a 100644 --- a/tests/compilers/native/quoting.hy +++ b/tests/compilers/native/quoting.hy @@ -1,10 +1,11 @@ ;;; ;;; -(import [hy [HyExpression HySymbol HyString]]) +(import [hy [HyExpression HySymbol HyString HyBytes]]) (defn test-basic-quoting [] (assert (= (type (quote (foo bar))) HyExpression)) (assert (= (type (quote foo)) HySymbol)) - (assert (= (type (quote "string")) HyString))) + (assert (= (type (quote "string")) HyString)) + (assert (= (type (quote b"string")) HyBytes)))