示例#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
 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