コード例 #1
0
    def test_configuration_reinstantiation(self):
        # Trying several instantiations one after the other. This test doesn't
        # only test the instantiation, but also reinstantiation after cleanup

        # With implicit exit
        engine = rtneuron.RTNeuron(sys.argv)
        engine.init()

        # Without deleting the object
        # This throws because the new instance is created before the old
        # one is destroyed.
        self.assertRaises(RuntimeError, rtneuron.RTNeuron)

        del engine

        engine = rtneuron.RTNeuron(sys.argv)
        engine.init()
        del engine
コード例 #2
0
 def setUp(self):
     self.engine = rtneuron.RTNeuron(sys.argv)
     self.engine.init(setup.medium_rect_eq_config)
     self.view = self.engine.views[0]
コード例 #3
0
 def test_configuration_instantiation_explicit_exit(self):
     engine = rtneuron.RTNeuron()
     engine.init()
     engine.exit()
     del engine
コード例 #4
0
 def test_configuration_instantiation_with_config(self):
     engine = rtneuron.RTNeuron()
     engine.init(setup.medium_rect_eq_config)
     del engine
コード例 #5
0
 def test_creation_with_args_and_attributes(self):
     attributes = rtneuron.AttributeMap({'soma_radius': 10})
     engine = rtneuron.RTNeuron(sys.argv, attributes)
コード例 #6
0
 def test_creation_with_attributes(self):
     attributes = rtneuron.AttributeMap({'soma_radius': 10})
     engine = rtneuron.RTNeuron(attributes=attributes)
コード例 #7
0
 def test_creation_with_args(self):
     args = ['--eq-flags', '']
     engine = rtneuron.RTNeuron(args)
コード例 #8
0
 def test_creation_without_args(self):
     engine = rtneuron.RTNeuron()
コード例 #9
0
ファイル: test_camera.py プロジェクト: abuchin/RTNeuron
 def setUp(self):
     self.engine = rtneuron.RTNeuron()
     self.engine.init(setup.small_eq_config)
     self.engine.resume()
     self.view = self.engine.views[0]
     self.camera = self.view.camera