Exemplo n.º 1
0
 def test_parse(self):
     """ Should work properly on valid data """
     res = [
         Production("Adj", ["'fall'"]),
         Production("Adj", ["'spring'"]),
         Production("Adj", ["'purple'"]),
         Production("Adj", ["'left'"])
     ]
     self.assertEqual(res, Production.parse_production(self.line))
Exemplo n.º 2
0
 def test_return_array(self):
     """ Make sure it returns an array """
     self.assertIsInstance(Production.parse_production(self.line), list)