Example #1
0
 def setUp(self):
     self.arc = DriversArchitect('Drivers', 3)
Example #2
0
 def setUp(self):
     self.arc = DriversArchitect('Drivers', 3)
Example #3
0
class TestDriversArchitect(unittest.TestCase):
    def setUp(self):
        self.arc = DriversArchitect('Drivers', 3)

    def test_00_start_stop(self):
        self.arc.init()
        self.arc.start()
        self.arc.stop()

    def test_01_start_kill(self):
        self.arc.init()
        self.arc.start()
        self.arc.kill()

    def test_02_getEmitter(self):
        self.assertRaises(KeyError, self.arc.getEmitter, 0)
        self.arc.init()
        emitter = self.arc.getEmitter(0)
        self.assertIsInstance(emitter, Emitter)
        emitter = self.arc.getEmitter(1)
        self.assertIsInstance(emitter, Emitter)
        emitter = self.arc.getEmitter(2)
        self.assertIsInstance(emitter, Emitter)
        self.assertRaises(KeyError, self.arc.getEmitter, 3)
Example #4
0
class TestDriversArchitect(unittest.TestCase):
    def setUp(self):
        self.arc = DriversArchitect('Drivers', 3)

    def test_00_start_stop(self):
        self.arc.init()
        self.arc.start()
        self.arc.stop()

    def test_01_start_kill(self):
        self.arc.init()
        self.arc.start()
        self.arc.kill()

    def test_02_getEmitter(self):
        self.assertRaises(KeyError, self.arc.getEmitter, 0)
        self.arc.init()
        emitter = self.arc.getEmitter(0)
        self.assertIsInstance(emitter, Emitter)
        emitter = self.arc.getEmitter(1)
        self.assertIsInstance(emitter, Emitter)
        emitter = self.arc.getEmitter(2)
        self.assertIsInstance(emitter, Emitter)
        self.assertRaises(KeyError, self.arc.getEmitter, 3)