Example #1
0
 def test_by_class(self):
     eq_(p('.class').xpath, 'p[has_word(@class, "class")]')
Example #2
0
 def test_by_multiple_attributes(self):
     eq_(p('.class', '#id', other='other').xpath,
         'p[has_word(@class, "class")][@id="id"][@other="other"]')
Example #3
0
 def test_by_id(self):
     eq_(p('#id').xpath, 'p[@id="id"]')