def test_cons_list():
 entry = tokenize('(a . [])')[0]
 assert (entry == HyList([HySymbol('a')]))
 assert (type(entry) == HyList)
 entry = tokenize('(a . ())')[0]
 assert (entry == HyExpression([HySymbol('a')]))
 assert (type(entry) == HyExpression)
 entry = tokenize('(a b . {})')[0]
 assert (entry == HyDict([HySymbol('a'), HySymbol('b')]))
 assert (type(entry) == HyDict)

def test_cons_list ( ) : entry = tokenize ( '(a . [])' ) [ 0 ] assert ( entry == HyList ( [ HySymbol ( 'a' ) ] ) ) assert ( type ( entry ) == HyList ) entry = tokenize ( '(a . ())' ) [ 0 ] assert ( entry == HyExpression ( [ HySymbol ( 'a' ) ] ) ) assert ( type ( entry ) == HyExpression ) entry = tokenize ( '(a b . {})' ) [ 0 ] assert ( entry == HyDict ( [ HySymbol ( 'a' ) , HySymbol ( 'b' ) ] ) ) assert ( type ( entry ) == HyDict )
check that cons of something and a list gets tokenized as a list .