def sub_not_ok(self): lift1 = Elevator(1) lift2 = Elevator(2) for _ in range(5): lift2.lift() try: result = lift1 - lift2 print('Test not Ok', result) except IncorrectOperation: print('Test Ok')
def take_inv(self, base): base: "Base" from lift import Elevator while not Elevator().validate_inv(self): cur_inv = base.give_inv(self) if cur_inv is None: break self.using_inv.append(cur_inv)
def lt_ok(self): lift1 = Elevator(1) lift2 = Elevator(2) for _ in range(5): lift1.lift() for _ in range(10): lift2.lift() if lift1 < lift2: print('Test Ok') else: print('Test not Ok')
def lift_ok(self): lift1 = Elevator(1) lift2 = Elevator(2) for _ in range(10): lift1.lift() for _ in range(5): lift2.lift() if lift1.call == 10 and lift2.call == 5: print('Test Ok') else: print('Test not Ok')
def total_call_ok(self): lift1 = Elevator(1) lift2 = Elevator(2) for _ in range(30): lift1.lift() for _ in range(12): lift2.lift() if Elevator.total_call == 42: print('Test Ok') else: print('Test not Ok')