Пример #1
0
 def test_stop(self):
     ex.comm_write(EXP, "RR 12332")
     self.assertEqual(format('Stop: %s - Stopping' % ex.name_format(EXP)),
                      ex.stop(EXP),
                      "use stop function in wait should show msg and "
                      + "change status")
     self.assertEqual(ex.get_status(EXP), "W",
                      "when stop in run should change status to wait")
     ex.comm_write(EXP, "WR 23123")
     self.assertEqual(format('%s - Last Command Not Processed Yet' %
                             ex.name_format(EXP)), ex.stop(EXP),
                      "use stop function in wait should show msg and "
                      + "no other change")
     ex.comm_write(EXP, "PR 33241")
     self.assertEqual(format('Stop: %s - Stopping Paused Explorer' %
                             ex.name_format(EXP)), ex.stop(EXP),
                      "use stop function in pause should show msg and "
                      + "change status")
     self.assertEqual(ex.get_status(EXP), "W",
                      "when stop in pause should change status to wait")
     ex.comm_write(EXP, "SR 23123")
     self.assertEqual(format('Stop: %s - Cannot Stop non-Started Explorer' %
                             ex.name_format(EXP)), ex.stop(EXP),
                      "use stop function in stop should show msg and "
                      + "no other change")
     self.tearDown()
Пример #2
0
 def tearDown(self):
     ex.stop(EXP)