class_docstr: 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.
class_docstr_tok: ["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","can","not","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","."]
code: def run_pipeline(self, pipeline, pyx, pxds=None):
      if pxds is None:
          pxds = {}
      tree = self.fragment(pyx, pxds).root
      # Run pipeline
      for T in pipeline:
          tree = T(tree)
      return tree
  
imports: from __future__ import absolute_import
  import os
  import unittest
  import tempfile
  from .Compiler import Errors
  from .CodeWriter import CodeWriter
  from .Compiler.TreeFragment import TreeFragment, strip_common_indent
  from .Compiler.Visitor import TreeVisitor, VisitorTransform
  from .Compiler import TreePath
label_desc: Use image node_id 1 for calling the TransformTest obj's underlying member method code with example usage: obj.run_pipeline(pipeline, pyx, pxds) and returns: tree