Ejemplo n.º 1
0
 def test_locate_engine_class(self):
     cls = _locate_engine_class(FFI(), self.generic)
     if self.generic:
         # asked for the generic engine, which must not generate a
         # CPython extension module
         assert not cls._gen_python_module
     else:
         # asked for the CPython engine: check that we got it, unless
         # we are running on top of PyPy, where the generic engine is
         # always better
         if '__pypy__' not in sys.builtin_module_names:
             assert cls._gen_python_module
Ejemplo n.º 2
0
 def test_locate_engine_class(self):
     cls = _locate_engine_class(FFI(), self.generic)
     if self.generic:
         # asked for the generic engine, which must not generate a
         # CPython extension module
         assert not cls._gen_python_module
     else:
         # asked for the CPython engine: check that we got it, unless
         # we are running on top of PyPy, where the generic engine is
         # always better
         if '__pypy__' not in sys.builtin_module_names:
             assert cls._gen_python_module