예제 #1
0
파일: testParser.py 프로젝트: andrewf/fern
 def testParseMap(self):
     p=Parser("{a=42 b={foo='bar'} @'guh' =   [3 4]}")
     self.assertTrue(p.map())
     self.assertEqual({'a':42,'b':{'foo':'bar'}, 'guh':[3, 4]}, p.result.eval())
예제 #2
0
파일: testParser.py 프로젝트: andrewf/fern
 def testParseEmptyMap(self):
     p=Parser('{}')
     self.assertTrue(p.map())
     self.assertEqual({}, p.result.eval())