Esempio n. 1
0
 def test_relative3(self):
     """test a relative path expression (relative method)"""
     xpb = XPathBuilder()
     xp = xpb.foo.bar[xpb.relative(True).x.y.log_or(xpb.relative(True).z)]
     exp = '/foo/bar[x/y or z]'
     self.assertEqual(xp.tostring(), exp)
Esempio n. 2
0
 def test_relative3(self):
     """test a relative path expression (relative method)"""
     xpb = XPathBuilder()
     xp = xpb.foo.bar[xpb.relative(True).x.y.log_or(xpb.relative(True).z)]
     exp = '/foo/bar[x/y or z]'
     self.assertEqual(xp.tostring(), exp)