Package lxml :: Package tests :: Module test_xpathevaluator
[frames] | no frames]

Module test_xpathevaluator

source code

Test cases related to XPath evaluation and the XPath class
Classes
  ETreeXPathTestCase
XPath tests etree
  ETreeXPathClassTestCase
Tests for the XPath class
  ETreeETXPathClassTestCase
Tests for the ETXPath class
Functions
 
tag(elem) source code
 
stringTest(ctxt, s1) source code
 
floatTest(ctxt, f1) source code
 
booleanTest(ctxt, b1) source code
 
setTest(ctxt, st1) source code
 
setTest2(ctxt, st1) source code
 
argsTest1(ctxt, s, f, b, st) source code
 
argsTest2(ctxt, st1, st2) source code
 
resultTypesTest(ctxt) source code
 
resultTypesTest2(ctxt) source code
 
xpath()
Test xpath extension functions.
source code
 
test_suite() source code
Variables
  SAMPLE_XML = etree.parse(StringIO(...
  uri = 'http://www.example.com/'
  extension = {(None, 'argsTest1'): <function argsTest1 at 0x8ea...
Variables Details

SAMPLE_XML

Value:
etree.parse(StringIO("""
<body>
  <tag>text</tag>
  <section>
    <tag>subtext</tag>
  </section>
  <tag />
  <tag />
...

extension

Value:
{(None, 'stringTest'): stringTest, (None, 'floatTest'): floatTest, (No\
ne, 'booleanTest'): booleanTest, (None, 'setTest'): setTest, (None, 's\
etTest2'): setTest2, (None, 'argsTest1'): argsTest1, (None, 'argsTest2\
'): argsTest2, (None, 'resultTypesTest'): resultTypesTest, (None, 'res\
ultTypesTest2'): resultTypesTest2,}