class_docstr: Enable tests for a full test cases directory.
  
  This class load test from individual .py in a directory and expose
  them to the unittest framework. Methods are added to the class (not the
  instance object) because py.test will collect tests by introspection before
  eventually instantiating the class for each test.
  
  It is intended to be subclassed and then initialized using the static
  populate() method.
  
  A few class attributes defined the behavior:
  
  check_output -- Trigger code execution and match return value for Pythran
                  compiled code against pure python. If set to False, only
                  the compilation step is checked.
  files        -- list of files to load, if empty path is used (see below)
  path         -- path where every .py will be loaded
  interface    -- method returning the Pythran interface to use (dict)
class_docstr_tok: ["Enable","tests","for","a","full","test","cases","directory",".","This","class","load","test","from","individual",".py","in","a","directory","and","expose","them","to","the","unittest","framework",".","Methods","are","added","to","the","class","(","not","the","instance","object",")","because","py.test","will","collect","tests","by","introspection","before","eventually","instantiating","the","class","for","each","test",".","It","is","intended","to","be","subclassed","and","then","initialized","using","the","static","populate","(",")","method",".","A","few","class","attributes","defined","the","behavior",":","check_output","--","Trigger","code","execution","and","match","return","value","for","Pythran","compiled","code","against","pure","python",".","If","set","to","False",",","only","the","compilation","step","is","checked",".","files","--","list","of","files","to","load",",","if","empty","path","is","used","(","see","below",")","path","--","path","where","every",".py","will","be","loaded","interface","--","method","returning","the","Pythran","interface","to","use","(","dict",")"]
docstr: Return Pythran specs.
docstr_tok: ["Return","Pythran","specs","."]
code: def interface(name=None, file_=None):
      """Return Pythran specs."""
  
      # Look for an extra spec file
      spec_file = os.path.splitext(file_)[0] + ".pythran"
      if os.path.isfile(spec_file):
          return load_specfile(spec_file)
      elif file_ is None:
          return Spec({name: []})
      else:
          with open(file_) as fd:
              return spec_parser(fd.read())
  
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 1 for calling the TestFromDir obj's underlying member method code with example usage: obj.interface(name, file_) and returns: load_specfile, Spec, spec_parser