def test_dicts():
 objs = tokenize('{foo bar bar baz}')
 assert (objs == [HyDict(['foo', 'bar', 'bar', 'baz'])])
 objs = tokenize('(bar {foo bar bar baz})')
 assert (objs == [HyExpression([HySymbol('bar'), HyDict(['foo', 'bar', 'bar', 'baz'])])])
 objs = tokenize('{(foo bar) (baz quux)}')
 assert (objs == [HyDict([HyExpression([HySymbol('foo'), HySymbol('bar')]), HyExpression([HySymbol('baz'), HySymbol('quux')])])])

def test_dicts ( ) : objs = tokenize ( '{foo bar bar baz}' ) assert ( objs == [ HyDict ( [ 'foo' , 'bar' , 'bar' , 'baz' ] ) ] ) objs = tokenize ( '(bar {foo bar bar baz})' ) assert ( objs == [ HyExpression ( [ HySymbol ( 'bar' ) , HyDict ( [ 'foo' , 'bar' , 'bar' , 'baz' ] ) ] ) ] ) objs = tokenize ( '{(foo bar) (baz quux)}' ) assert ( objs == [ HyDict ( [ HyExpression ( [ HySymbol ( 'foo' ) , HySymbol ( 'bar' ) ] ) , HyExpression ( [ HySymbol ( 'baz' ) , HySymbol ( 'quux' ) ] ) ] ) ] )
ensure that we can tokenize a dict .