Exemple #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)
Exemple #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]')
Exemple #3
0
 def test_position(self):
     query = _make_xpath_query("descendant::text:h", position=1)
     self.assertEqual(query, "(descendant::text:h)[2]")
Exemple #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"]')
Exemple #5
0
 def test_element(self):
     query = _make_xpath_query("descendant::text:p")
     self.assertEqual(query, "descendant::text:p")
Exemple #6
0
 def test_position(self):
     query = _make_xpath_query('descendant::text:h', position=1)
     self.assertEqual(query, '(descendant::text:h)[2]')