예제 #1
0
 def test_two_attributes(self):
     query = _make_xpath_query('descendant::text:h',
                               text_style=u"Standard",
                               outline_level=1)
     expected = ('descendant::text:h[@text:outline-level="1"]'
                 '[@text:style-name="Standard"]')
     self.assertEqual(query, expected)
예제 #2
0
 def test_two_attributes_position(self):
     query = _make_xpath_query('descendant::text:h',
             text_style=u"Standard", outline_level=1, position=1)
     expected = ('(descendant::text:h[@text:outline-level="1"]'
                 '[@text:style-name="Standard"])[2]')
     self.assertEqual(query, expected)
예제 #3
0
 def test_attribute_position(self):
     query = _make_xpath_query('descendant::text:p',
             text_style=u"Standard", position=1)
     self.assertEqual(query,
             '(descendant::text:p[@text:style-name="Standard"])[2]')
예제 #4
0
 def test_position(self):
     query = _make_xpath_query('descendant::text:h', position=1)
     self.assertEqual(query, '(descendant::text:h)[2]')
예제 #5
0
 def test_attribute(self):
     query = _make_xpath_query('descendant::text:p',
             text_style=u"Standard")
     self.assertEqual(query,
                      'descendant::text:p[@text:style-name="Standard"]')
예제 #6
0
 def test_element(self):
     query = _make_xpath_query('descendant::text:p')
     self.assertEqual(query, 'descendant::text:p')
예제 #7
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]')
예제 #8
0
 def test_position(self):
     query = _make_xpath_query('descendant::text:h', position=1)
     self.assertEqual(query, '(descendant::text:h)[2]')
예제 #9
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"]')
예제 #10
0
 def test_element(self):
     query = _make_xpath_query('descendant::text:p')
     self.assertEqual(query, 'descendant::text:p')