Beispiel #1
0
 def test_two_attributes(self):
     query = _make_xpath_query("descendant::text:h",
                               text_style="Standard",
                               outline_level=1)
     expected = ('descendant::text:h[@text:outline-level="1"]'
                 '[@text:style-name="Standard"]')
     self.assertEqual(query, expected)
Beispiel #2
0
 def test_attribute_position(self):
     query = _make_xpath_query("descendant::text:p",
                               text_style="Standard",
                               position=1)
     self.assertEqual(
         query, '(descendant::text:p[@text:style-name="Standard"])[2]')
Beispiel #3
0
 def test_position(self):
     query = _make_xpath_query("descendant::text:h", position=1)
     self.assertEqual(query, "(descendant::text:h)[2]")
Beispiel #4
0
 def test_attribute(self):
     query = _make_xpath_query("descendant::text:p", text_style="Standard")
     self.assertEqual(query,
                      'descendant::text:p[@text:style-name="Standard"]')
Beispiel #5
0
 def test_element(self):
     query = _make_xpath_query("descendant::text:p")
     self.assertEqual(query, "descendant::text:p")
Beispiel #6
0
 def test_position(self):
     query = _make_xpath_query('descendant::text:h', position=1)
     self.assertEqual(query, '(descendant::text:h)[2]')