示例#1
0
文件: test_edn.py 项目: jml/edn
 def test_custom(self):
     result = make_tagged_value(
         {Symbol('foo'): lambda x: list(reversed(x))},
         Symbol('foo'), 'bar')
     self.assertEqual(['r', 'a', 'b'], result)
示例#2
0
文件: test_edn.py 项目: jml/edn
 def test_default(self):
     result = make_tagged_value({}, Symbol('foo'), 'bar')
     self.assertEqual(TaggedValue(Symbol('foo'), 'bar'), result)