Example #1
0
 def test_elemfindall(self):
     """
     `elemfind` finds all sub-elements with the `QualifiedName` or path
     specified.
     """
     self.assertEqual(['<child1 />'],
                      map(tostring, elemfindall(self.root, L.child1)))
     self.assertEqual(['<child2 />', '<child2 />'],
                      map(tostring, elemfindall(self.root, 'child2')))
Example #2
0
 def test_elemfindall(self):
     """
     `elemfind` finds all sub-elements with the `QualifiedName` or path
     specified.
     """
     self.assertEqual(
         ['<child1 />'],
         map(tostring, elemfindall(self.root, L.child1)))
     self.assertEqual(
         ['<child2 />', '<child2 />'],
         map(tostring, elemfindall(self.root, 'child2')))
Example #3
0
 def test_elemfindall_none(self):
     """
     `elemfind` returns an empty list if the `QualifiedName` or path
     specified cannot be found.
     """
     self.assertEqual([], elemfindall(self.root, L.what))
Example #4
0
 def test_elemfindall_none(self):
     """
     `elemfind` returns an empty list if the `QualifiedName` or path
     specified cannot be found.
     """
     self.assertEqual([], elemfindall(self.root, L.what))