Fix bug: quoting a bytestring raises ImportError (#1245)
This commit is contained in:
parent
6620cc4e6f
commit
8ecb17d1fd
@ -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
|
||||
|
@ -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)))
|
||||
|
Loading…
Reference in New Issue
Block a user