Ejemplo n.º 1
0
 def tearDown(self):
     # Check that the NullEngine was not set as the default mlab engine.
     if not mlab.get_engine() is self._non_null_engine:
         raise AssertionError("The NullEngine has overridden the default one")
     engine_manager.current_engine = None
     # Unregistering all unused engines.
     registry.unregister_engine(self._non_null_engine)
     for engine in list(registry.engines):
         registry.unregister_engine(engine)
Ejemplo n.º 2
0
 def tearDown(self):
     # Check that the NullEngine was not set as the default mlab engine.
     if not mlab.get_engine() is self._non_null_engine:
         raise AssertionError("The NullEngine has overridden the default one")
     engine_manager.current_engine = None
     # Unregistering all unused engines.
     registry.unregister_engine(self._non_null_engine)
     for engine in list(registry.engines):
         registry.unregister_engine(engine)
Ejemplo n.º 3
0
 def tearDown(self):
     # Check that the NullEngine is still the mlab engine
     if not mlab.get_engine() is self.e:
         raise AssertionError, \
                 "The NullEngine has been overridden"
     engine_manager.current_engine = None
     # Unregistering the engine, to avoid side-effects between tests
     self.e.stop()
     registry.unregister_engine(self.e)
Ejemplo n.º 4
0
 def _closed_fired(self):
     """ When the engine is closed, clear the viewer ref which otherwise
         stores references to scenes to prevent crash on QT4.
         See: self.new_scene and MlabSceneModel._closed_fired
     """
     self._viewer_ref.clear()
     self.scenes = []
     preference_manager.root.on_trait_change(
         self._show_helper_nodes_changed, 'show_helper_nodes', remove=True)
     registry.unregister_engine(self)
 def tearDown(self):
     # Check that the NullEngine is still the mlab engine
     current_engine = mlab.get_engine()
     engine_overridden = current_engine is not self.e
     engine_manager.current_engine = None
     self.e.stop()
     registry.unregister_engine(self.e)
     if engine_overridden:
         current_engine.stop()
         registry.unregister_engine(current_engine)
         raise AssertionError("The NullEngine has been overridden")
Ejemplo n.º 6
0
 def _closed_fired(self):
     """ When the engine is closed, clear the viewer ref which otherwise
         stores references to scenes to prevent crash on QT4.
         See: self.new_scene and MlabSceneModel._closed_fired
     """
     self._viewer_ref.clear()
     self.scenes = []
     preference_manager.root.on_trait_change(self._show_helper_nodes_changed,
                                             'show_helper_nodes',
                                             remove=True)
     registry.unregister_engine(self)
Ejemplo n.º 7
0
 def tearDown(self):
     # Check that the NullEngine is still the mlab engine
     current_engine = mlab.get_engine()
     engine_overridden = current_engine is not self.e
     engine_manager.current_engine = None
     self.e.stop()
     registry.unregister_engine(self.e)
     if engine_overridden:
         current_engine.stop()
         registry.unregister_engine(current_engine)
         raise AssertionError("The NullEngine has been overridden")
Ejemplo n.º 8
0
 def tearDown(self):
     mlab.options.backend = self.backend
     for engine in list(registry.engines):
         registry.unregister_engine(engine)
 def tearDown(self):
     for engine in list(registry.engines.keys()):
         registry.unregister_engine(engine)
Ejemplo n.º 10
0
 def tearDown(self):
     engine_manager.current_engine = None
     # Unregistering the engine, to avoid side-effects between tests
     self.e.stop()
     registry.unregister_engine(self.e)
Ejemplo n.º 11
0
 def tearDown(self):
     if self.less_than_or_equal_to_vtk_5_10:
         super(TestMlabPipeline, self).tearDown()
     else:
         for engine in list(registry.engines.keys()):
             registry.unregister_engine(engine)
Ejemplo n.º 12
0
 def tearDown(self):
     mlab.options.backend = self.backend
     for engine in list(registry.engines):
         registry.unregister_engine(engine)
Ejemplo n.º 13
0
 def tearDown(self):
     if self.less_than_vtk_5_6:
         super(TestMlabPipeline, self).setUp()
     else:
         for engine in registry.engines:
             registry.unregister_engine(engine)
Ejemplo n.º 14
0
 def tearDown(self):
     if self.less_than_or_equal_to_vtk_5_10:
         super(TestMlabPipeline, self).tearDown()
     else:
         for engine in list(registry.engines.keys()):
             registry.unregister_engine(engine)
Ejemplo n.º 15
0
 def tearDown(self):
     if self.less_than_vtk_5_6:
         super(TestMlabPipeline, self).setUp()
     else:
         for engine in registry.engines:
             registry.unregister_engine(engine)
Ejemplo n.º 16
0
 def stop(self):
     registry.unregister_engine(self)
     self.running = False
     self.closed = True
Ejemplo n.º 17
0
 def _stop_unregister_all_engines(self):
     # Some tests leave around engines hanging around, so we clean them
     # up to avoid strange test errors.
     for engine in list(registry.engines.values()):
         engine.stop()
         registry.unregister_engine(engine)
Ejemplo n.º 18
0
 def stop(self):
     registry.unregister_engine(self)
     self.running = False
 def _stop_unregister_all_engines(self):
     # Some tests leave around engines hanging around, so we clean them
     # up to avoid strange test errors.
     for engine in list(registry.engines.values()):
         engine.stop()
         registry.unregister_engine(engine)
Ejemplo n.º 20
0
 def tearDown(self):
     engine_manager.current_engine = None
     # Unregistering the engine, to avoid side-effects between tests
     self.e.stop()
     registry.unregister_engine(self.e)