Fix bug: quoting a bytestring raises ImportError (#1245)

This commit is contained in:
Kodi Arfer 2017-03-04 17:04:28 -08:00 committed by Ryan Gonzalez
parent 6620cc4e6f
commit 8ecb17d1fd
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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)))