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)
 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)
 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)
Exemple #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")
Exemple #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)
 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")
 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)
 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)
 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)
 def tearDown(self):
     mlab.options.backend = self.backend
     for engine in list(registry.engines):
         registry.unregister_engine(engine)
 def tearDown(self):
     if self.less_than_vtk_5_6:
         super(TestMlabPipeline, self).setUp()
     else:
         for engine in registry.engines:
             registry.unregister_engine(engine)
 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)
 def tearDown(self):
     if self.less_than_vtk_5_6:
         super(TestMlabPipeline, self).setUp()
     else:
         for engine in registry.engines:
             registry.unregister_engine(engine)
Exemple #16
0
 def stop(self):
     registry.unregister_engine(self)
     self.running = False
     self.closed = True
 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)
Exemple #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)
Exemple #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)