def _generate_test(data, path, expected): if hasattr(expected, '__call__'): return lambda self: self.assertTrue( expected(resolve(data, path, default=None))) else: return lambda self: self.assertEqual( resolve(data, path, default=None), expected)
def _generate_test(data, path, expected): if hasattr(expected, '__call__'): return lambda self: self.assertTrue(expected(resolve(data, path, default=None))) else: return lambda self: self.assertEqual(resolve(data, path, default=None), expected)
def _generate_test(data, path, expected): return lambda self: self.assertRaises(expected, lambda: resolve(data, path))
def _generate_test(data, path, expected): return lambda self: self.assertRaises(expected, lambda: resolve( data, path))