class_docstr: Test environment to validate a pythran execution against python. 
class_docstr_tok: ["Test","environment","to","validate","a","pythran","execution","against","python","."]
docstr: Run Pythran code and clean Pythran dynamic library.
  
  runas may be a string to run or a
  tuple : (function name, list of parameters).
docstr_tok: ["Run","Pythran","code","and","clean","Pythran","dynamic","library",".","runas","may","be","a","string","to","run","or","a","tuple",":","(","function","name",",","list","of","parameters",")","."]
code: def run_pythran(
      self,
      modname,
      module_path,
      runas,
      prelude=None,
      check_exception=False,
  ):
      """
      Run Pythran code and clean Pythran dynamic library.
  
      runas may be a string to run or a
      tuple : (function name, list of parameters).
      """
      # Caller may requires some cleaning
      prelude and prelude()
      loader = importlib.machinery.ExtensionFileLoader(
          modname, module_path
      )
      spec = importlib.machinery.ModuleSpec(
          name=modname, loader=loader, origin=module_path
      )
      pymod = importlib._bootstrap._load(spec)
  
      err_msg = "Excepected exception but none raise."
      try:
          if isinstance(runas, tuple):
              ret_val = getattr(pymod, runas[0])(*runas[1])
          else:
              # Produce the pythran result, exec in the loaded module ctx
              exec(runas, pymod.__dict__)
              ret_val = getattr(pymod, self.TEST_RETURNVAL)
          if check_exception:
              raise AssertionError(err_msg)
          return ret_val
      except BaseException as e:
          if not check_exception or e.args[0] == err_msg:
              raise
          return type(e)
  
imports: import importlib
  from numpy import float32, float64, complex128
  from numpy import intp, intc, number, bool_
  from numpy import ndarray, isnan, isinf, isneginf, complex128, complex64
  from textwrap import dedent
  from threading import Thread
  import copy
  import math
  import glob
  import numpy.testing
  import os
  import numbers
  import sys
  import unittest
  from functools import reduce
  from operator import add
  import logging
  from pythran import compile_pythrancode, spec_parser, load_specfile, frontend
  from pythran.backend import Python
  from pythran.middlend import refine
  from pythran.passmanager import PassManager
  from pythran.toolchain import _parse_optimization
  from pythran.spec import Spec
label_desc: Use image node_id 4 for calling the TestEnv obj's underlying member method code with example usage: obj.run_pythran(modname, module_path, runas, prelude, check_exception) and returns: ret_val, type