def test_selectors(self):
    '\n            Test the :contains and :in_bbox selectors.\n        '
    label = self.pdf.pq('LTTextLineHorizontal:contains("Your first name and initial")')
    self.assertEqual(len(label), 1)
    left_corner = float(label.attr('x0'))
    self.assertEqual(left_corner, 143.651)
    bottom_corner = float(label.attr('y0'))
    self.assertEqual(bottom_corner, 714.694)
    name = self.pdf.pq(('LTTextLineHorizontal:in_bbox("%s, %s, %s, %s")' % (left_corner, (bottom_corner - 30), (left_corner + 150), bottom_corner))).text()
    self.assertEqual(name, 'John E.')
Test the :contains and :in_bbox selectors.
def test_selectors(self):
    '\n            \n        '
    label = self.pdf.pq('LTTextLineHorizontal:contains("Your first name and initial")')
    self.assertEqual(len(label), 1)
    left_corner = float(label.attr('x0'))
    self.assertEqual(left_corner, 143.651)
    bottom_corner = float(label.attr('y0'))
    self.assertEqual(bottom_corner, 714.694)
    name = self.pdf.pq(('LTTextLineHorizontal:in_bbox("%s, %s, %s, %s")' % (left_corner, (bottom_corner - 30), (left_corner + 150), bottom_corner))).text()
    self.assertEqual(name, 'John E.')