def test_manually_confirm(self):
        """Test a series of random positions, read simulated HW to confirm."""
        for i in range(10):
            # Generate random position and set servo to that position
            test_pos = randint(0, 180)
            self.servo.position = test_pos

            # Confirm that motor was set correctly
            cur_pwm = self.get_pwm(self.pwm_num)
            duty = int(cur_pwm["duty_ns"])
            read_pos = int(round(((580000 - duty) / 2320000.) * 180))
            assert read_pos == test_pos, "{} != {}".format(read_pos, test_pos)
dataset/ETHPy150Open IEEERobotics/bot/tests/test_servo.py/TestPosition.test_manually_confirm/swapped operands of `-`