def test(self): exception, msg = self.errors.get(name, (parsley.ParseError, None)) with self.assertRaises(exception) as e: tomsbestfriend.loads(toml) if msg is not None: self.assertEqual(str(e.exception).replace("u'", "'"), msg)
def test(self): self.assertEqual(tomsbestfriend.loads(toml), output)