Module Expr Str Import alias alias alias Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareNotIn NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num NameLoad ImportFrom alias alias alias alias alias ImportFrom alias alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr ListComp NameLoad comprehension NameStore NameLoad CompareEq AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr ListComp NameLoad comprehension NameStore NameLoad CompareIn Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Call NameLoad Str Str TryFinally body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad finalbody Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad Call AttributeLoad NameLoad attr Index Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Call NameLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad Call AttributeLoad NameLoad attr Index Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Call NameLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr ListLoad Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr ListLoad Call NameLoad Str Return NameLoad decorator_list If CompareEq NameLoad Str body Print BinOpMod Str NameLoad
N/A N/A 
Test cases related to RelaxNG parsing and validation
 N/A unittest sys os.path N/A this_dir N/A N/A N/A os path dirname __file__ N/A N/A this_dir N/A sys path N/A N/A N/A N/A N/A sys path insert 0 this_dir common_imports etree BytesIO _bytes HelperTestCase fileInTestDir common_imports doctest make_doctest ETreeRelaxNGTestCase N/A HelperTestCase N/A test_relaxng N/A N/A self N/A N/A N/A tree_valid N/A N/A self parse <a><b></b></a> N/A tree_invalid N/A N/A self parse <a><c></c></a> N/A schema N/A N/A self parse <element name="a" xmlns="http://relaxng.org/ns/structure/1.0">
  <zeroOrMore>
     <element name="b">
       <text />
     </element>
  </zeroOrMore>
</element>
 N/A schema N/A N/A etree RelaxNG schema N/A N/A N/A self assertTrue N/A N/A schema validate tree_valid N/A N/A N/A self assertFalse N/A N/A N/A schema error_log filter_from_errors N/A N/A N/A self assertFalse N/A N/A schema validate tree_invalid N/A N/A N/A self assertTrue N/A N/A N/A schema error_log filter_from_errors N/A N/A N/A self assertTrue N/A N/A schema validate tree_valid N/A N/A N/A self assertFalse N/A N/A N/A schema error_log filter_from_errors N/A test_relaxng_stringio N/A N/A self N/A N/A N/A tree_valid N/A N/A self parse <a><b></b></a> N/A tree_invalid N/A N/A self parse <a><c></c></a> N/A schema_file N/A BytesIO <element name="a" xmlns="http://relaxng.org/ns/structure/1.0">
  <zeroOrMore>
     <element name="b">
       <text />
     </element>
  </zeroOrMore>
</element>
 N/A schema N/A N/A etree RelaxNG file schema_file N/A N/A N/A self assertTrue N/A N/A schema validate tree_valid N/A N/A N/A self assertFalse N/A N/A schema validate tree_invalid N/A test_relaxng_elementtree_error N/A N/A self N/A N/A N/A N/A N/A self assertRaises ValueError N/A etree RelaxNG N/A N/A etree ElementTree N/A test_relaxng_error N/A N/A self N/A N/A N/A tree_invalid N/A N/A self parse <a><c></c></a> N/A schema N/A N/A self parse <element name="a" xmlns="http://relaxng.org/ns/structure/1.0">
  <zeroOrMore>
     <element name="b">
       <text />
     </element>
  </zeroOrMore>
</element>
 N/A schema N/A N/A etree RelaxNG schema N/A N/A N/A self assertFalse N/A N/A schema validate tree_invalid N/A errors N/A schema error_log N/A N/A N/A self assertTrue N/A log N/A log errors N/A N/A log level_name ERROR N/A N/A N/A self assertTrue N/A log N/A log errors N/A not expect N/A log message N/A test_relaxng_invalid_schema N/A N/A self N/A N/A N/A schema N/A N/A self parse <element name="a" xmlns="http://relaxng.org/ns/structure/1.0">
  <zeroOrMore>
     <element name="b" />
  </zeroOrMore>
</element>
 N/A N/A N/A self assertRaises N/A etree RelaxNGParseError N/A etree RelaxNG schema N/A test_relaxng_invalid_schema2 N/A N/A self N/A N/A N/A schema N/A N/A self parse <grammar xmlns="http://relaxng.org/ns/structure/1.0" />
 N/A N/A N/A self assertRaises N/A etree RelaxNGParseError N/A etree RelaxNG schema N/A test_relaxng_invalid_schema3 N/A N/A self N/A N/A N/A schema N/A N/A self parse <grammar xmlns="http://relaxng.org/ns/structure/1.0">
  <define name="test">
    <element name="test"/>
  </define>
</grammar>
 N/A N/A N/A self assertRaises N/A etree RelaxNGParseError N/A etree RelaxNG schema N/A test_relaxng_invalid_schema4 N/A N/A self N/A N/A N/A schema N/A N/A self parse <element name="a" xmlns="mynamespace" />
 N/A N/A N/A self assertRaises N/A etree RelaxNGParseError N/A etree RelaxNG schema N/A test_relaxng_include N/A N/A self N/A N/A N/A f N/A open N/A fileInTestDir test1.rng rb N/A N/A N/A schema N/A N/A etree RelaxNG file f N/A N/A N/A N/A f close N/A test_relaxng_shortcut N/A N/A self N/A N/A N/A tree_valid N/A N/A self parse <a><b></b></a> N/A tree_invalid N/A N/A self parse <a><c></c></a> N/A schema N/A N/A self parse <element name="a" xmlns="http://relaxng.org/ns/structure/1.0">
  <zeroOrMore>
     <element name="b">
       <text />
     </element>
  </zeroOrMore>
</element>
 N/A N/A N/A self assertTrue N/A N/A tree_valid relaxng schema N/A N/A N/A self assertFalse N/A N/A tree_invalid relaxng schema N/A test_multiple_elementrees N/A N/A self N/A N/A N/A tree N/A N/A self parse <a><b>B</b><c>C</c></a> N/A schema N/A N/A etree RelaxNG N/A N/A self parse <element name="a" xmlns="http://relaxng.org/ns/structure/1.0">
  <element name="b">
    <text />
  </element>
  <element name="c">
    <text />
  </element>
</element>
 N/A N/A N/A self assertTrue N/A N/A schema validate tree N/A N/A N/A self assertFalse N/A N/A N/A schema error_log filter_from_errors N/A N/A N/A self assertTrue N/A N/A schema validate tree N/A N/A N/A self assertFalse N/A N/A N/A schema error_log filter_from_errors N/A schema N/A N/A etree RelaxNG N/A N/A self parse <element name="b" xmlns="http://relaxng.org/ns/structure/1.0">
  <text />
</element>
 N/A c_tree N/A N/A etree ElementTree N/A N/A N/A tree getroot N/A 1 N/A N/A N/A self assertEqual N/A N/A self _rootstring c_tree N/A _bytes <c>C</c> N/A N/A N/A self assertFalse N/A N/A schema validate c_tree N/A N/A N/A self assertTrue N/A N/A N/A schema error_log filter_from_errors N/A b_tree N/A N/A etree ElementTree N/A N/A N/A tree getroot N/A 0 N/A N/A N/A self assertEqual N/A N/A self _rootstring b_tree N/A _bytes <b>B</b> N/A N/A N/A self assertTrue N/A N/A schema validate b_tree N/A N/A N/A self assertFalse N/A N/A N/A schema error_log filter_from_errors N/A N/A test_suite N/A N/A N/A N/A N/A suite N/A N/A unittest TestSuite N/A N/A N/A suite addTests N/A N/A N/A unittest makeSuite ETreeRelaxNGTestCase N/A N/A N/A suite addTests N/A N/A make_doctest ../../../doc/validation.txt N/A suite N/A N/A N/A __name__ __main__ N/A N/A N/A to test use test.py %s __file__