Module Import alias identifier ImportFrom alias Import alias ImportFrom alias Import alias identifier ImportFrom alias alias ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareEq Call NameLoad AttributeLoad NameLoad attr Num body Assign NameStore Str orelse Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num If CompareIsNot SubscriptLoad NameLoad Index Num NameLoad body Assign NameStore BinOpMod Str SubscriptLoad NameLoad Slice Num Num orelse Assign NameStore SubscriptLoad NameLoad Index Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd BinOpMult Str AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr AugAssignAdd AttributeStore NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad AugAssignSub AttributeStore NameLoad attr Num decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad Str attr BinOpAdd BinOpAdd ListLoad Str AttributeLoad NameLoad attr ListLoad Str decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str For TupleStore NameStore TupleStore NameStore NameStore Call NameLoad Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad BinOpMod Str TupleLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Call NameLoad NameLoad BinOpMod Str TupleLoad Call AttributeLoad Str attr NameLoad Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad Str attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str For TupleStore NameStore TupleStore NameStore NameStore Call NameLoad Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad BinOpMod Str TupleLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Call NameLoad NameLoad BinOpMod Str TupleLoad Call AttributeLoad Str attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Dict ListLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If Call AttributeLoad NameLoad attr Str body Assign NameStore SubscriptLoad NameLoad Slice Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Return Call NameLoad NameLoad NameLoad NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str TryExcept body Expr Call NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str TryExcept body Return Call NameLoad handlers ExceptHandler body Expr Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Dict body Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr NameLoad NameLoad attr For NameStore NameLoad body Assign NameStore Call NameLoad NameLoad Return NameLoad decorator_list decorator_list
N/A N/A Cython.Compiler.Errors Errors Cython.CodeWriter CodeWriter N/A unittest Cython.Compiler.ModuleNode ModuleNode N/A Cython.Compiler.Main Main Cython.Compiler.TreeFragment TreeFragment strip_common_indent Cython.Compiler.Visitor TreeVisitor NodeTypeWriter N/A TreeVisitor N/A __init__ N/A N/A self N/A N/A N/A N/A N/A N/A super NodeTypeWriter self __init__ N/A N/A self _indents 0 N/A N/A self result N/A N/A visit_Node N/A N/A self node N/A N/A N/A N/A N/A len N/A self access_path 0 N/A N/A name (root) N/A N/A tip N/A N/A self access_path N/A -1 N/A N/A N/A tip N/A 2 None N/A N/A name N/A %s[%d] N/A tip N/A 1 3 N/A N/A name N/A tip N/A 1 N/A N/A N/A N/A self result append N/A N/A N/A self _indents N/A %s: %s N/A name N/A N/A node __class__ __name__ N/A N/A self _indents 1 N/A N/A N/A self visitchildren node N/A N/A self _indents 1 N/A N/A treetypes N/A N/A root N/A N/A N/A Returns a string representing the tree by class names.
    There's a leading and trailing whitespace so that it can be
    compared by simple string comparison while still making test
    cases look ok. N/A w N/A NodeTypeWriter N/A N/A N/A w visit root N/A N/A N/A join N/A N/A N/A N/A w result N/A N/A CythonTest N/A N/A unittest TestCase N/A assertLines N/A N/A self expected result N/A N/A N/A Checks that the given strings or lists of strings are equal line by line N/A N/A N/A isinstance expected list N/A N/A expected N/A N/A expected split N/A N/A N/A isinstance result list N/A N/A result N/A N/A result split N/A N/A idx N/A expected_line result_line N/A enumerate N/A zip expected result N/A N/A N/A N/A self assertEqual expected_line result_line N/A Line %d:
Exp: %s
Got: %s N/A idx expected_line result_line N/A N/A N/A self assertEqual N/A len expected N/A len result N/A Unmatched lines. Got:
%s
Expected:
%s N/A N/A N/A join expected N/A N/A join result N/A codeToLines N/A N/A self tree N/A N/A N/A writer N/A CodeWriter N/A N/A N/A writer write tree N/A N/A N/A writer result lines N/A codeToString N/A N/A self tree N/A N/A N/A N/A N/A join N/A N/A self codeToLines tree N/A assertCode N/A N/A self expected result_tree N/A N/A N/A result_lines N/A N/A self codeToLines result_tree N/A expected_lines N/A strip_common_indent N/A N/A expected split N/A N/A idx N/A line expected_line N/A enumerate N/A zip result_lines expected_lines N/A N/A N/A N/A self assertEqual expected_line line N/A Line %d:
Got: %s
Exp: %s N/A idx line expected_line N/A N/A N/A self assertEqual N/A len result_lines N/A len expected_lines N/A Unmatched lines. Got:
%s
Expected:
%s N/A N/A N/A join result_lines expected N/A fragment N/A N/A self code pxds pipeline N/A N/A N/A N/A N/A Simply create a tree fragment using the name of the test-case in parse errors. N/A name N/A N/A self id N/A N/A N/A name startswith __main__. N/A N/A name N/A name N/A N/A len __main__. N/A name N/A N/A name replace . _ N/A N/A TreeFragment code name pxds pipeline pipeline N/A treetypes N/A N/A self root N/A N/A N/A N/A treetypes root N/A should_fail N/A N/A self func exc_type N/A Exception N/A N/A Calls "func" and fails if it doesn't raise the right exception
        (any exception by default). Also returns the exception in question.
         N/A N/A N/A N/A func N/A N/A N/A self fail N/A Expected an exception of type %r exc_type N/A N/A N/A exc_type N/A e N/A N/A N/A N/A self assert_ N/A isinstance e exc_type N/A e N/A should_not_fail N/A N/A self func N/A N/A N/A Calls func and succeeds if and only if no exception is raised
        (i.e. converts exception raising into a failed testcase). Returns
        the return value of func. N/A N/A N/A N/A func N/A N/A N/A N/A N/A N/A self fail N/A N/A TransformTest N/A CythonTest N/A N/A 
    Utility base class for transform unit tests. It is based around constructing
    test trees (either explicitly or by parsing a Cython code string); running
    the transform, serialize it using a customized Cython serializer (with
    special markup for nodes that cannot be represented in Cython),
    and do a string-comparison line-by-line of the result.

    To create a test case:
     - Call run_pipeline. The pipeline should at least contain the transform you
       are testing; pyx should be either a string (passed to the parser to
       create a post-parse tree) or a node representing input to pipeline.
       The result will be a transformed result.
       
     - Check that the tree is correct. If wanted, assertCode can be used, which
       takes a code string as expected, and a ModuleNode in result_tree
       (it serializes the ModuleNode to a string and compares line-by-line).
    
    All code strings are first stripped for whitespace lines and then common
    indentation.
       
    Plans: One could have a pxd dictionary parameter to run_pipeline.
     run_pipeline N/A N/A self pipeline pyx pxds N/A N/A N/A N/A tree N/A N/A N/A self fragment pyx pxds root N/A T pipeline N/A N/A tree N/A T tree N/A tree N/A N/A