Add autoreconnect feature #868
82 errors, 1 skipped, 1 704 pass in 51s
Annotations
Check failure on line 0 in tests.test_data_model_motor_test.TestMotorTestDataModelInitialization
github-actions / Test Results
test_user_can_initialize_model_with_connected_flight_controller (tests.test_data_model_motor_test.TestMotorTestDataModelInitialization) with error
artifacts/coverage-3.9-xml/results-junit.xml [took 0s]
Raw output
failed on setup with "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'"
@pytest.fixture
def mock_flight_controller() -> MagicMock:
"""Fixture providing a mock flight controller with realistic test data."""
fc = MagicMock(spec=FlightController)
fc.master = MagicMock() # Simulate connected state
fc.fc_parameters = {
"FRAME_CLASS": 1,
"FRAME_TYPE": 1,
"BATT_MONITOR": 4,
"BATT_ARM_VOLT": 11.0,
"MOT_BAT_VOLT_MAX": 16.8,
"MOT_SPIN_ARM": 0.10,
"MOT_SPIN_MIN": 0.15,
}
# Configure frame info and motor count
fc.get_frame_info.return_value = (1, 1) # Quad X
fc.is_battery_monitoring_enabled.return_value = True
fc.get_battery_status.return_value = ((12.4, 2.1), "")
fc.get_voltage_thresholds.return_value = (11.0, 16.8)
# Configure motor test methods
fc.test_motor.return_value = (True, "")
fc.test_all_motors.return_value = (True, "")
fc.test_motors_in_sequence.return_value = (True, "")
fc.stop_all_motors.return_value = (True, "")
# Configure set_param to update fc_parameters and return success
def set_param_side_effect(param_name: str, value: float) -> bool:
fc.fc_parameters[param_name] = value
return True
fc.set_param.side_effect = set_param_side_effect
# Configure fetch_param to return values from fc_parameters
> def fetch_param_side_effect(param_name: str) -> float | None:
E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
tests/test_data_model_motor_test.py:70: TypeError
Check failure on line 0 in tests.test_data_model_motor_test.TestMotorTestDataModelFrameConfiguration
github-actions / Test Results
test_user_can_get_motor_labels_for_current_frame (tests.test_data_model_motor_test.TestMotorTestDataModelFrameConfiguration) with error
artifacts/coverage-3.9-xml/results-junit.xml [took 0s]
Raw output
failed on setup with "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'"
@pytest.fixture
def mock_flight_controller() -> MagicMock:
"""Fixture providing a mock flight controller with realistic test data."""
fc = MagicMock(spec=FlightController)
fc.master = MagicMock() # Simulate connected state
fc.fc_parameters = {
"FRAME_CLASS": 1,
"FRAME_TYPE": 1,
"BATT_MONITOR": 4,
"BATT_ARM_VOLT": 11.0,
"MOT_BAT_VOLT_MAX": 16.8,
"MOT_SPIN_ARM": 0.10,
"MOT_SPIN_MIN": 0.15,
}
# Configure frame info and motor count
fc.get_frame_info.return_value = (1, 1) # Quad X
fc.is_battery_monitoring_enabled.return_value = True
fc.get_battery_status.return_value = ((12.4, 2.1), "")
fc.get_voltage_thresholds.return_value = (11.0, 16.8)
# Configure motor test methods
fc.test_motor.return_value = (True, "")
fc.test_all_motors.return_value = (True, "")
fc.test_motors_in_sequence.return_value = (True, "")
fc.stop_all_motors.return_value = (True, "")
# Configure set_param to update fc_parameters and return success
def set_param_side_effect(param_name: str, value: float) -> bool:
fc.fc_parameters[param_name] = value
return True
fc.set_param.side_effect = set_param_side_effect
# Configure fetch_param to return values from fc_parameters
> def fetch_param_side_effect(param_name: str) -> float | None:
E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
tests/test_data_model_motor_test.py:70: TypeError
Check failure on line 0 in tests.test_data_model_motor_test.TestMotorTestDataModelFrameConfiguration
github-actions / Test Results
test_user_can_get_motor_numbers_for_current_frame (tests.test_data_model_motor_test.TestMotorTestDataModelFrameConfiguration) with error
artifacts/coverage-3.9-xml/results-junit.xml [took 0s]
Raw output
failed on setup with "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'"
@pytest.fixture
def mock_flight_controller() -> MagicMock:
"""Fixture providing a mock flight controller with realistic test data."""
fc = MagicMock(spec=FlightController)
fc.master = MagicMock() # Simulate connected state
fc.fc_parameters = {
"FRAME_CLASS": 1,
"FRAME_TYPE": 1,
"BATT_MONITOR": 4,
"BATT_ARM_VOLT": 11.0,
"MOT_BAT_VOLT_MAX": 16.8,
"MOT_SPIN_ARM": 0.10,
"MOT_SPIN_MIN": 0.15,
}
# Configure frame info and motor count
fc.get_frame_info.return_value = (1, 1) # Quad X
fc.is_battery_monitoring_enabled.return_value = True
fc.get_battery_status.return_value = ((12.4, 2.1), "")
fc.get_voltage_thresholds.return_value = (11.0, 16.8)
# Configure motor test methods
fc.test_motor.return_value = (True, "")
fc.test_all_motors.return_value = (True, "")
fc.test_motors_in_sequence.return_value = (True, "")
fc.stop_all_motors.return_value = (True, "")
# Configure set_param to update fc_parameters and return success
def set_param_side_effect(param_name: str, value: float) -> bool:
fc.fc_parameters[param_name] = value
return True
fc.set_param.side_effect = set_param_side_effect
# Configure fetch_param to return values from fc_parameters
> def fetch_param_side_effect(param_name: str) -> float | None:
E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
tests/test_data_model_motor_test.py:70: TypeError
Check failure on line 0 in tests.test_data_model_motor_test.TestMotorTestDataModelFrameConfiguration
github-actions / Test Results
test_user_can_update_frame_configuration_successfully (tests.test_data_model_motor_test.TestMotorTestDataModelFrameConfiguration) with error
artifacts/coverage-3.9-xml/results-junit.xml [took 0s]
Raw output
failed on setup with "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'"
@pytest.fixture
def mock_flight_controller() -> MagicMock:
"""Fixture providing a mock flight controller with realistic test data."""
fc = MagicMock(spec=FlightController)
fc.master = MagicMock() # Simulate connected state
fc.fc_parameters = {
"FRAME_CLASS": 1,
"FRAME_TYPE": 1,
"BATT_MONITOR": 4,
"BATT_ARM_VOLT": 11.0,
"MOT_BAT_VOLT_MAX": 16.8,
"MOT_SPIN_ARM": 0.10,
"MOT_SPIN_MIN": 0.15,
}
# Configure frame info and motor count
fc.get_frame_info.return_value = (1, 1) # Quad X
fc.is_battery_monitoring_enabled.return_value = True
fc.get_battery_status.return_value = ((12.4, 2.1), "")
fc.get_voltage_thresholds.return_value = (11.0, 16.8)
# Configure motor test methods
fc.test_motor.return_value = (True, "")
fc.test_all_motors.return_value = (True, "")
fc.test_motors_in_sequence.return_value = (True, "")
fc.stop_all_motors.return_value = (True, "")
# Configure set_param to update fc_parameters and return success
def set_param_side_effect(param_name: str, value: float) -> bool:
fc.fc_parameters[param_name] = value
return True
fc.set_param.side_effect = set_param_side_effect
# Configure fetch_param to return values from fc_parameters
> def fetch_param_side_effect(param_name: str) -> float | None:
E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
tests/test_data_model_motor_test.py:70: TypeError
Check failure on line 0 in tests.test_data_model_motor_test.TestMotorTestDataModelFrameConfiguration
github-actions / Test Results
test_user_can_update_frame_configuration_and_motor_count (tests.test_data_model_motor_test.TestMotorTestDataModelFrameConfiguration) with error
artifacts/coverage-3.9-xml/results-junit.xml [took 0s]
Raw output
failed on setup with "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'"
@pytest.fixture
def mock_flight_controller() -> MagicMock:
"""Fixture providing a mock flight controller with realistic test data."""
fc = MagicMock(spec=FlightController)
fc.master = MagicMock() # Simulate connected state
fc.fc_parameters = {
"FRAME_CLASS": 1,
"FRAME_TYPE": 1,
"BATT_MONITOR": 4,
"BATT_ARM_VOLT": 11.0,
"MOT_BAT_VOLT_MAX": 16.8,
"MOT_SPIN_ARM": 0.10,
"MOT_SPIN_MIN": 0.15,
}
# Configure frame info and motor count
fc.get_frame_info.return_value = (1, 1) # Quad X
fc.is_battery_monitoring_enabled.return_value = True
fc.get_battery_status.return_value = ((12.4, 2.1), "")
fc.get_voltage_thresholds.return_value = (11.0, 16.8)
# Configure motor test methods
fc.test_motor.return_value = (True, "")
fc.test_all_motors.return_value = (True, "")
fc.test_motors_in_sequence.return_value = (True, "")
fc.stop_all_motors.return_value = (True, "")
# Configure set_param to update fc_parameters and return success
def set_param_side_effect(param_name: str, value: float) -> bool:
fc.fc_parameters[param_name] = value
return True
fc.set_param.side_effect = set_param_side_effect
# Configure fetch_param to return values from fc_parameters
> def fetch_param_side_effect(param_name: str) -> float | None:
E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
tests/test_data_model_motor_test.py:70: TypeError
Check failure on line 0 in tests.test_data_model_motor_test.TestMotorTestDataModelBatteryMonitoring
github-actions / Test Results
test_user_can_check_battery_monitoring_status_when_enabled (tests.test_data_model_motor_test.TestMotorTestDataModelBatteryMonitoring) with error
artifacts/coverage-3.9-xml/results-junit.xml [took 0s]
Raw output
failed on setup with "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'"
@pytest.fixture
def mock_flight_controller() -> MagicMock:
"""Fixture providing a mock flight controller with realistic test data."""
fc = MagicMock(spec=FlightController)
fc.master = MagicMock() # Simulate connected state
fc.fc_parameters = {
"FRAME_CLASS": 1,
"FRAME_TYPE": 1,
"BATT_MONITOR": 4,
"BATT_ARM_VOLT": 11.0,
"MOT_BAT_VOLT_MAX": 16.8,
"MOT_SPIN_ARM": 0.10,
"MOT_SPIN_MIN": 0.15,
}
# Configure frame info and motor count
fc.get_frame_info.return_value = (1, 1) # Quad X
fc.is_battery_monitoring_enabled.return_value = True
fc.get_battery_status.return_value = ((12.4, 2.1), "")
fc.get_voltage_thresholds.return_value = (11.0, 16.8)
# Configure motor test methods
fc.test_motor.return_value = (True, "")
fc.test_all_motors.return_value = (True, "")
fc.test_motors_in_sequence.return_value = (True, "")
fc.stop_all_motors.return_value = (True, "")
# Configure set_param to update fc_parameters and return success
def set_param_side_effect(param_name: str, value: float) -> bool:
fc.fc_parameters[param_name] = value
return True
fc.set_param.side_effect = set_param_side_effect
# Configure fetch_param to return values from fc_parameters
> def fetch_param_side_effect(param_name: str) -> float | None:
E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
tests/test_data_model_motor_test.py:70: TypeError
Check failure on line 0 in tests.test_data_model_motor_test.TestMotorTestDataModelBatteryMonitoring
github-actions / Test Results
test_user_can_get_current_battery_status (tests.test_data_model_motor_test.TestMotorTestDataModelBatteryMonitoring) with error
artifacts/coverage-3.9-xml/results-junit.xml [took 0s]
Raw output
failed on setup with "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'"
@pytest.fixture
def mock_flight_controller() -> MagicMock:
"""Fixture providing a mock flight controller with realistic test data."""
fc = MagicMock(spec=FlightController)
fc.master = MagicMock() # Simulate connected state
fc.fc_parameters = {
"FRAME_CLASS": 1,
"FRAME_TYPE": 1,
"BATT_MONITOR": 4,
"BATT_ARM_VOLT": 11.0,
"MOT_BAT_VOLT_MAX": 16.8,
"MOT_SPIN_ARM": 0.10,
"MOT_SPIN_MIN": 0.15,
}
# Configure frame info and motor count
fc.get_frame_info.return_value = (1, 1) # Quad X
fc.is_battery_monitoring_enabled.return_value = True
fc.get_battery_status.return_value = ((12.4, 2.1), "")
fc.get_voltage_thresholds.return_value = (11.0, 16.8)
# Configure motor test methods
fc.test_motor.return_value = (True, "")
fc.test_all_motors.return_value = (True, "")
fc.test_motors_in_sequence.return_value = (True, "")
fc.stop_all_motors.return_value = (True, "")
# Configure set_param to update fc_parameters and return success
def set_param_side_effect(param_name: str, value: float) -> bool:
fc.fc_parameters[param_name] = value
return True
fc.set_param.side_effect = set_param_side_effect
# Configure fetch_param to return values from fc_parameters
> def fetch_param_side_effect(param_name: str) -> float | None:
E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
tests/test_data_model_motor_test.py:70: TypeError
Check failure on line 0 in tests.test_data_model_motor_test.TestMotorTestDataModelBatteryMonitoring
github-actions / Test Results
test_user_gets_no_battery_status_when_monitoring_disabled (tests.test_data_model_motor_test.TestMotorTestDataModelBatteryMonitoring) with error
artifacts/coverage-3.9-xml/results-junit.xml [took 0s]
Raw output
failed on setup with "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'"
@pytest.fixture
def mock_flight_controller() -> MagicMock:
"""Fixture providing a mock flight controller with realistic test data."""
fc = MagicMock(spec=FlightController)
fc.master = MagicMock() # Simulate connected state
fc.fc_parameters = {
"FRAME_CLASS": 1,
"FRAME_TYPE": 1,
"BATT_MONITOR": 4,
"BATT_ARM_VOLT": 11.0,
"MOT_BAT_VOLT_MAX": 16.8,
"MOT_SPIN_ARM": 0.10,
"MOT_SPIN_MIN": 0.15,
}
# Configure frame info and motor count
fc.get_frame_info.return_value = (1, 1) # Quad X
fc.is_battery_monitoring_enabled.return_value = True
fc.get_battery_status.return_value = ((12.4, 2.1), "")
fc.get_voltage_thresholds.return_value = (11.0, 16.8)
# Configure motor test methods
fc.test_motor.return_value = (True, "")
fc.test_all_motors.return_value = (True, "")
fc.test_motors_in_sequence.return_value = (True, "")
fc.stop_all_motors.return_value = (True, "")
# Configure set_param to update fc_parameters and return success
def set_param_side_effect(param_name: str, value: float) -> bool:
fc.fc_parameters[param_name] = value
return True
fc.set_param.side_effect = set_param_side_effect
# Configure fetch_param to return values from fc_parameters
> def fetch_param_side_effect(param_name: str) -> float | None:
E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
tests/test_data_model_motor_test.py:70: TypeError
Check failure on line 0 in tests.test_data_model_motor_test.TestMotorTestDataModelBatteryMonitoring
github-actions / Test Results
test_user_can_get_voltage_thresholds_for_safety (tests.test_data_model_motor_test.TestMotorTestDataModelBatteryMonitoring) with error
artifacts/coverage-3.9-xml/results-junit.xml [took 0s]
Raw output
failed on setup with "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'"
@pytest.fixture
def mock_flight_controller() -> MagicMock:
"""Fixture providing a mock flight controller with realistic test data."""
fc = MagicMock(spec=FlightController)
fc.master = MagicMock() # Simulate connected state
fc.fc_parameters = {
"FRAME_CLASS": 1,
"FRAME_TYPE": 1,
"BATT_MONITOR": 4,
"BATT_ARM_VOLT": 11.0,
"MOT_BAT_VOLT_MAX": 16.8,
"MOT_SPIN_ARM": 0.10,
"MOT_SPIN_MIN": 0.15,
}
# Configure frame info and motor count
fc.get_frame_info.return_value = (1, 1) # Quad X
fc.is_battery_monitoring_enabled.return_value = True
fc.get_battery_status.return_value = ((12.4, 2.1), "")
fc.get_voltage_thresholds.return_value = (11.0, 16.8)
# Configure motor test methods
fc.test_motor.return_value = (True, "")
fc.test_all_motors.return_value = (True, "")
fc.test_motors_in_sequence.return_value = (True, "")
fc.stop_all_motors.return_value = (True, "")
# Configure set_param to update fc_parameters and return success
def set_param_side_effect(param_name: str, value: float) -> bool:
fc.fc_parameters[param_name] = value
return True
fc.set_param.side_effect = set_param_side_effect
# Configure fetch_param to return values from fc_parameters
> def fetch_param_side_effect(param_name: str) -> float | None:
E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
tests/test_data_model_motor_test.py:70: TypeError
Check failure on line 0 in tests.test_data_model_motor_test.TestMotorTestDataModelBatteryMonitoring
github-actions / Test Results
test_user_gets_safe_voltage_status_within_thresholds (tests.test_data_model_motor_test.TestMotorTestDataModelBatteryMonitoring) with error
artifacts/coverage-3.9-xml/results-junit.xml [took 0s]
Raw output
failed on setup with "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'"
@pytest.fixture
def mock_flight_controller() -> MagicMock:
"""Fixture providing a mock flight controller with realistic test data."""
fc = MagicMock(spec=FlightController)
fc.master = MagicMock() # Simulate connected state
fc.fc_parameters = {
"FRAME_CLASS": 1,
"FRAME_TYPE": 1,
"BATT_MONITOR": 4,
"BATT_ARM_VOLT": 11.0,
"MOT_BAT_VOLT_MAX": 16.8,
"MOT_SPIN_ARM": 0.10,
"MOT_SPIN_MIN": 0.15,
}
# Configure frame info and motor count
fc.get_frame_info.return_value = (1, 1) # Quad X
fc.is_battery_monitoring_enabled.return_value = True
fc.get_battery_status.return_value = ((12.4, 2.1), "")
fc.get_voltage_thresholds.return_value = (11.0, 16.8)
# Configure motor test methods
fc.test_motor.return_value = (True, "")
fc.test_all_motors.return_value = (True, "")
fc.test_motors_in_sequence.return_value = (True, "")
fc.stop_all_motors.return_value = (True, "")
# Configure set_param to update fc_parameters and return success
def set_param_side_effect(param_name: str, value: float) -> bool:
fc.fc_parameters[param_name] = value
return True
fc.set_param.side_effect = set_param_side_effect
# Configure fetch_param to return values from fc_parameters
> def fetch_param_side_effect(param_name: str) -> float | None:
E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
tests/test_data_model_motor_test.py:70: TypeError
Check failure on line 0 in tests.test_data_model_motor_test.TestMotorTestDataModelBatteryMonitoring
github-actions / Test Results
test_user_gets_critical_voltage_status_outside_thresholds (tests.test_data_model_motor_test.TestMotorTestDataModelBatteryMonitoring) with error
artifacts/coverage-3.9-xml/results-junit.xml [took 0s]
Raw output
failed on setup with "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'"
@pytest.fixture
def mock_flight_controller() -> MagicMock:
"""Fixture providing a mock flight controller with realistic test data."""
fc = MagicMock(spec=FlightController)
fc.master = MagicMock() # Simulate connected state
fc.fc_parameters = {
"FRAME_CLASS": 1,
"FRAME_TYPE": 1,
"BATT_MONITOR": 4,
"BATT_ARM_VOLT": 11.0,
"MOT_BAT_VOLT_MAX": 16.8,
"MOT_SPIN_ARM": 0.10,
"MOT_SPIN_MIN": 0.15,
}
# Configure frame info and motor count
fc.get_frame_info.return_value = (1, 1) # Quad X
fc.is_battery_monitoring_enabled.return_value = True
fc.get_battery_status.return_value = ((12.4, 2.1), "")
fc.get_voltage_thresholds.return_value = (11.0, 16.8)
# Configure motor test methods
fc.test_motor.return_value = (True, "")
fc.test_all_motors.return_value = (True, "")
fc.test_motors_in_sequence.return_value = (True, "")
fc.stop_all_motors.return_value = (True, "")
# Configure set_param to update fc_parameters and return success
def set_param_side_effect(param_name: str, value: float) -> bool:
fc.fc_parameters[param_name] = value
return True
fc.set_param.side_effect = set_param_side_effect
# Configure fetch_param to return values from fc_parameters
> def fetch_param_side_effect(param_name: str) -> float | None:
E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
tests/test_data_model_motor_test.py:70: TypeError
Check failure on line 0 in tests.test_data_model_motor_test.TestMotorTestDataModelBatteryMonitoring
github-actions / Test Results
test_user_gets_disabled_voltage_status_when_monitoring_disabled (tests.test_data_model_motor_test.TestMotorTestDataModelBatteryMonitoring) with error
artifacts/coverage-3.9-xml/results-junit.xml [took 0s]
Raw output
failed on setup with "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'"
@pytest.fixture
def mock_flight_controller() -> MagicMock:
"""Fixture providing a mock flight controller with realistic test data."""
fc = MagicMock(spec=FlightController)
fc.master = MagicMock() # Simulate connected state
fc.fc_parameters = {
"FRAME_CLASS": 1,
"FRAME_TYPE": 1,
"BATT_MONITOR": 4,
"BATT_ARM_VOLT": 11.0,
"MOT_BAT_VOLT_MAX": 16.8,
"MOT_SPIN_ARM": 0.10,
"MOT_SPIN_MIN": 0.15,
}
# Configure frame info and motor count
fc.get_frame_info.return_value = (1, 1) # Quad X
fc.is_battery_monitoring_enabled.return_value = True
fc.get_battery_status.return_value = ((12.4, 2.1), "")
fc.get_voltage_thresholds.return_value = (11.0, 16.8)
# Configure motor test methods
fc.test_motor.return_value = (True, "")
fc.test_all_motors.return_value = (True, "")
fc.test_motors_in_sequence.return_value = (True, "")
fc.stop_all_motors.return_value = (True, "")
# Configure set_param to update fc_parameters and return success
def set_param_side_effect(param_name: str, value: float) -> bool:
fc.fc_parameters[param_name] = value
return True
fc.set_param.side_effect = set_param_side_effect
# Configure fetch_param to return values from fc_parameters
> def fetch_param_side_effect(param_name: str) -> float | None:
E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
tests/test_data_model_motor_test.py:70: TypeError
Check failure on line 0 in tests.test_data_model_motor_test.TestMotorTestDataModelSafetyValidation
github-actions / Test Results
test_motor_testing_is_safe_with_good_conditions (tests.test_data_model_motor_test.TestMotorTestDataModelSafetyValidation) with error
artifacts/coverage-3.9-xml/results-junit.xml [took 0s]
Raw output
failed on setup with "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'"
@pytest.fixture
def mock_flight_controller() -> MagicMock:
"""Fixture providing a mock flight controller with realistic test data."""
fc = MagicMock(spec=FlightController)
fc.master = MagicMock() # Simulate connected state
fc.fc_parameters = {
"FRAME_CLASS": 1,
"FRAME_TYPE": 1,
"BATT_MONITOR": 4,
"BATT_ARM_VOLT": 11.0,
"MOT_BAT_VOLT_MAX": 16.8,
"MOT_SPIN_ARM": 0.10,
"MOT_SPIN_MIN": 0.15,
}
# Configure frame info and motor count
fc.get_frame_info.return_value = (1, 1) # Quad X
fc.is_battery_monitoring_enabled.return_value = True
fc.get_battery_status.return_value = ((12.4, 2.1), "")
fc.get_voltage_thresholds.return_value = (11.0, 16.8)
# Configure motor test methods
fc.test_motor.return_value = (True, "")
fc.test_all_motors.return_value = (True, "")
fc.test_motors_in_sequence.return_value = (True, "")
fc.stop_all_motors.return_value = (True, "")
# Configure set_param to update fc_parameters and return success
def set_param_side_effect(param_name: str, value: float) -> bool:
fc.fc_parameters[param_name] = value
return True
fc.set_param.side_effect = set_param_side_effect
# Configure fetch_param to return values from fc_parameters
> def fetch_param_side_effect(param_name: str) -> float | None:
E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
tests/test_data_model_motor_test.py:70: TypeError
Check failure on line 0 in tests.test_data_model_motor_test.TestMotorTestDataModelSafetyValidation
github-actions / Test Results
test_motor_testing_unsafe_with_disconnected_controller (tests.test_data_model_motor_test.TestMotorTestDataModelSafetyValidation) with error
artifacts/coverage-3.9-xml/results-junit.xml [took 0s]
Raw output
failed on setup with "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'"
@pytest.fixture
def mock_flight_controller() -> MagicMock:
"""Fixture providing a mock flight controller with realistic test data."""
fc = MagicMock(spec=FlightController)
fc.master = MagicMock() # Simulate connected state
fc.fc_parameters = {
"FRAME_CLASS": 1,
"FRAME_TYPE": 1,
"BATT_MONITOR": 4,
"BATT_ARM_VOLT": 11.0,
"MOT_BAT_VOLT_MAX": 16.8,
"MOT_SPIN_ARM": 0.10,
"MOT_SPIN_MIN": 0.15,
}
# Configure frame info and motor count
fc.get_frame_info.return_value = (1, 1) # Quad X
fc.is_battery_monitoring_enabled.return_value = True
fc.get_battery_status.return_value = ((12.4, 2.1), "")
fc.get_voltage_thresholds.return_value = (11.0, 16.8)
# Configure motor test methods
fc.test_motor.return_value = (True, "")
fc.test_all_motors.return_value = (True, "")
fc.test_motors_in_sequence.return_value = (True, "")
fc.stop_all_motors.return_value = (True, "")
# Configure set_param to update fc_parameters and return success
def set_param_side_effect(param_name: str, value: float) -> bool:
fc.fc_parameters[param_name] = value
return True
fc.set_param.side_effect = set_param_side_effect
# Configure fetch_param to return values from fc_parameters
> def fetch_param_side_effect(param_name: str) -> float | None:
E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
tests/test_data_model_motor_test.py:70: TypeError
Check failure on line 0 in tests.test_data_model_motor_test.TestMotorTestDataModelSafetyValidation
github-actions / Test Results
test_motor_testing_unsafe_with_no_battery_monitoring (tests.test_data_model_motor_test.TestMotorTestDataModelSafetyValidation) with error
artifacts/coverage-3.9-xml/results-junit.xml [took 0s]
Raw output
failed on setup with "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'"
@pytest.fixture
def mock_flight_controller() -> MagicMock:
"""Fixture providing a mock flight controller with realistic test data."""
fc = MagicMock(spec=FlightController)
fc.master = MagicMock() # Simulate connected state
fc.fc_parameters = {
"FRAME_CLASS": 1,
"FRAME_TYPE": 1,
"BATT_MONITOR": 4,
"BATT_ARM_VOLT": 11.0,
"MOT_BAT_VOLT_MAX": 16.8,
"MOT_SPIN_ARM": 0.10,
"MOT_SPIN_MIN": 0.15,
}
# Configure frame info and motor count
fc.get_frame_info.return_value = (1, 1) # Quad X
fc.is_battery_monitoring_enabled.return_value = True
fc.get_battery_status.return_value = ((12.4, 2.1), "")
fc.get_voltage_thresholds.return_value = (11.0, 16.8)
# Configure motor test methods
fc.test_motor.return_value = (True, "")
fc.test_all_motors.return_value = (True, "")
fc.test_motors_in_sequence.return_value = (True, "")
fc.stop_all_motors.return_value = (True, "")
# Configure set_param to update fc_parameters and return success
def set_param_side_effect(param_name: str, value: float) -> bool:
fc.fc_parameters[param_name] = value
return True
fc.set_param.side_effect = set_param_side_effect
# Configure fetch_param to return values from fc_parameters
> def fetch_param_side_effect(param_name: str) -> float | None:
E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
tests/test_data_model_motor_test.py:70: TypeError
Check failure on line 0 in tests.test_data_model_motor_test.TestMotorTestDataModelSafetyValidation
github-actions / Test Results
test_motor_testing_safe_with_battery_monitoring_disabled (tests.test_data_model_motor_test.TestMotorTestDataModelSafetyValidation) with error
artifacts/coverage-3.9-xml/results-junit.xml [took 0s]
Raw output
failed on setup with "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'"
@pytest.fixture
def mock_flight_controller() -> MagicMock:
"""Fixture providing a mock flight controller with realistic test data."""
fc = MagicMock(spec=FlightController)
fc.master = MagicMock() # Simulate connected state
fc.fc_parameters = {
"FRAME_CLASS": 1,
"FRAME_TYPE": 1,
"BATT_MONITOR": 4,
"BATT_ARM_VOLT": 11.0,
"MOT_BAT_VOLT_MAX": 16.8,
"MOT_SPIN_ARM": 0.10,
"MOT_SPIN_MIN": 0.15,
}
# Configure frame info and motor count
fc.get_frame_info.return_value = (1, 1) # Quad X
fc.is_battery_monitoring_enabled.return_value = True
fc.get_battery_status.return_value = ((12.4, 2.1), "")
fc.get_voltage_thresholds.return_value = (11.0, 16.8)
# Configure motor test methods
fc.test_motor.return_value = (True, "")
fc.test_all_motors.return_value = (True, "")
fc.test_motors_in_sequence.return_value = (True, "")
fc.stop_all_motors.return_value = (True, "")
# Configure set_param to update fc_parameters and return success
def set_param_side_effect(param_name: str, value: float) -> bool:
fc.fc_parameters[param_name] = value
return True
fc.set_param.side_effect = set_param_side_effect
# Configure fetch_param to return values from fc_parameters
> def fetch_param_side_effect(param_name: str) -> float | None:
E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
tests/test_data_model_motor_test.py:70: TypeError
Check failure on line 0 in tests.test_data_model_motor_test.TestMotorTestDataModelSafetyValidation
github-actions / Test Results
test_motor_testing_unsafe_with_low_voltage (tests.test_data_model_motor_test.TestMotorTestDataModelSafetyValidation) with error
artifacts/coverage-3.9-xml/results-junit.xml [took 0s]
Raw output
failed on setup with "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'"
@pytest.fixture
def mock_flight_controller() -> MagicMock:
"""Fixture providing a mock flight controller with realistic test data."""
fc = MagicMock(spec=FlightController)
fc.master = MagicMock() # Simulate connected state
fc.fc_parameters = {
"FRAME_CLASS": 1,
"FRAME_TYPE": 1,
"BATT_MONITOR": 4,
"BATT_ARM_VOLT": 11.0,
"MOT_BAT_VOLT_MAX": 16.8,
"MOT_SPIN_ARM": 0.10,
"MOT_SPIN_MIN": 0.15,
}
# Configure frame info and motor count
fc.get_frame_info.return_value = (1, 1) # Quad X
fc.is_battery_monitoring_enabled.return_value = True
fc.get_battery_status.return_value = ((12.4, 2.1), "")
fc.get_voltage_thresholds.return_value = (11.0, 16.8)
# Configure motor test methods
fc.test_motor.return_value = (True, "")
fc.test_all_motors.return_value = (True, "")
fc.test_motors_in_sequence.return_value = (True, "")
fc.stop_all_motors.return_value = (True, "")
# Configure set_param to update fc_parameters and return success
def set_param_side_effect(param_name: str, value: float) -> bool:
fc.fc_parameters[param_name] = value
return True
fc.set_param.side_effect = set_param_side_effect
# Configure fetch_param to return values from fc_parameters
> def fetch_param_side_effect(param_name: str) -> float | None:
E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
tests/test_data_model_motor_test.py:70: TypeError
Check failure on line 0 in tests.test_data_model_motor_test.TestMotorTestDataModelSafetyValidation
github-actions / Test Results
test_motor_testing_unsafe_with_high_voltage (tests.test_data_model_motor_test.TestMotorTestDataModelSafetyValidation) with error
artifacts/coverage-3.9-xml/results-junit.xml [took 0s]
Raw output
failed on setup with "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'"
@pytest.fixture
def mock_flight_controller() -> MagicMock:
"""Fixture providing a mock flight controller with realistic test data."""
fc = MagicMock(spec=FlightController)
fc.master = MagicMock() # Simulate connected state
fc.fc_parameters = {
"FRAME_CLASS": 1,
"FRAME_TYPE": 1,
"BATT_MONITOR": 4,
"BATT_ARM_VOLT": 11.0,
"MOT_BAT_VOLT_MAX": 16.8,
"MOT_SPIN_ARM": 0.10,
"MOT_SPIN_MIN": 0.15,
}
# Configure frame info and motor count
fc.get_frame_info.return_value = (1, 1) # Quad X
fc.is_battery_monitoring_enabled.return_value = True
fc.get_battery_status.return_value = ((12.4, 2.1), "")
fc.get_voltage_thresholds.return_value = (11.0, 16.8)
# Configure motor test methods
fc.test_motor.return_value = (True, "")
fc.test_all_motors.return_value = (True, "")
fc.test_motors_in_sequence.return_value = (True, "")
fc.stop_all_motors.return_value = (True, "")
# Configure set_param to update fc_parameters and return success
def set_param_side_effect(param_name: str, value: float) -> bool:
fc.fc_parameters[param_name] = value
return True
fc.set_param.side_effect = set_param_side_effect
# Configure fetch_param to return values from fc_parameters
> def fetch_param_side_effect(param_name: str) -> float | None:
E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
tests/test_data_model_motor_test.py:70: TypeError
github-actions / Test Results
test_user_can_set_motor_parameter_successfully (tests.test_data_model_motor_test.TestMotorTestDataModelParameterManagement) with error
artifacts/coverage-3.9-xml/results-junit.xml [took 0s]
Raw output
failed on setup with "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'"
@pytest.fixture
def mock_flight_controller() -> MagicMock:
"""Fixture providing a mock flight controller with realistic test data."""
fc = MagicMock(spec=FlightController)
fc.master = MagicMock() # Simulate connected state
fc.fc_parameters = {
"FRAME_CLASS": 1,
"FRAME_TYPE": 1,
"BATT_MONITOR": 4,
"BATT_ARM_VOLT": 11.0,
"MOT_BAT_VOLT_MAX": 16.8,
"MOT_SPIN_ARM": 0.10,
"MOT_SPIN_MIN": 0.15,
}
# Configure frame info and motor count
fc.get_frame_info.return_value = (1, 1) # Quad X
fc.is_battery_monitoring_enabled.return_value = True
fc.get_battery_status.return_value = ((12.4, 2.1), "")
fc.get_voltage_thresholds.return_value = (11.0, 16.8)
# Configure motor test methods
fc.test_motor.return_value = (True, "")
fc.test_all_motors.return_value = (True, "")
fc.test_motors_in_sequence.return_value = (True, "")
fc.stop_all_motors.return_value = (True, "")
# Configure set_param to update fc_parameters and return success
def set_param_side_effect(param_name: str, value: float) -> bool:
fc.fc_parameters[param_name] = value
return True
fc.set_param.side_effect = set_param_side_effect
# Configure fetch_param to return values from fc_parameters
> def fetch_param_side_effect(param_name: str) -> float | None:
E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
tests/test_data_model_motor_test.py:70: TypeError
github-actions / Test Results
test_parameter_setting_fails_with_disconnected_controller (tests.test_data_model_motor_test.TestMotorTestDataModelParameterManagement) with error
artifacts/coverage-3.9-xml/results-junit.xml [took 0s]
Raw output
failed on setup with "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'"
@pytest.fixture
def mock_flight_controller() -> MagicMock:
"""Fixture providing a mock flight controller with realistic test data."""
fc = MagicMock(spec=FlightController)
fc.master = MagicMock() # Simulate connected state
fc.fc_parameters = {
"FRAME_CLASS": 1,
"FRAME_TYPE": 1,
"BATT_MONITOR": 4,
"BATT_ARM_VOLT": 11.0,
"MOT_BAT_VOLT_MAX": 16.8,
"MOT_SPIN_ARM": 0.10,
"MOT_SPIN_MIN": 0.15,
}
# Configure frame info and motor count
fc.get_frame_info.return_value = (1, 1) # Quad X
fc.is_battery_monitoring_enabled.return_value = True
fc.get_battery_status.return_value = ((12.4, 2.1), "")
fc.get_voltage_thresholds.return_value = (11.0, 16.8)
# Configure motor test methods
fc.test_motor.return_value = (True, "")
fc.test_all_motors.return_value = (True, "")
fc.test_motors_in_sequence.return_value = (True, "")
fc.stop_all_motors.return_value = (True, "")
# Configure set_param to update fc_parameters and return success
def set_param_side_effect(param_name: str, value: float) -> bool:
fc.fc_parameters[param_name] = value
return True
fc.set_param.side_effect = set_param_side_effect
# Configure fetch_param to return values from fc_parameters
> def fetch_param_side_effect(param_name: str) -> float | None:
E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
tests/test_data_model_motor_test.py:70: TypeError
github-actions / Test Results
test_parameter_validation_rejects_out_of_bounds_values (tests.test_data_model_motor_test.TestMotorTestDataModelParameterManagement) with error
artifacts/coverage-3.9-xml/results-junit.xml [took 0s]
Raw output
failed on setup with "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'"
@pytest.fixture
def mock_flight_controller() -> MagicMock:
"""Fixture providing a mock flight controller with realistic test data."""
fc = MagicMock(spec=FlightController)
fc.master = MagicMock() # Simulate connected state
fc.fc_parameters = {
"FRAME_CLASS": 1,
"FRAME_TYPE": 1,
"BATT_MONITOR": 4,
"BATT_ARM_VOLT": 11.0,
"MOT_BAT_VOLT_MAX": 16.8,
"MOT_SPIN_ARM": 0.10,
"MOT_SPIN_MIN": 0.15,
}
# Configure frame info and motor count
fc.get_frame_info.return_value = (1, 1) # Quad X
fc.is_battery_monitoring_enabled.return_value = True
fc.get_battery_status.return_value = ((12.4, 2.1), "")
fc.get_voltage_thresholds.return_value = (11.0, 16.8)
# Configure motor test methods
fc.test_motor.return_value = (True, "")
fc.test_all_motors.return_value = (True, "")
fc.test_motors_in_sequence.return_value = (True, "")
fc.stop_all_motors.return_value = (True, "")
# Configure set_param to update fc_parameters and return success
def set_param_side_effect(param_name: str, value: float) -> bool:
fc.fc_parameters[param_name] = value
return True
fc.set_param.side_effect = set_param_side_effect
# Configure fetch_param to return values from fc_parameters
> def fetch_param_side_effect(param_name: str) -> float | None:
E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
tests/test_data_model_motor_test.py:70: TypeError
github-actions / Test Results
test_parameter_verification_detects_setting_failure (tests.test_data_model_motor_test.TestMotorTestDataModelParameterManagement) with error
artifacts/coverage-3.9-xml/results-junit.xml [took 0s]
Raw output
failed on setup with "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'"
@pytest.fixture
def mock_flight_controller() -> MagicMock:
"""Fixture providing a mock flight controller with realistic test data."""
fc = MagicMock(spec=FlightController)
fc.master = MagicMock() # Simulate connected state
fc.fc_parameters = {
"FRAME_CLASS": 1,
"FRAME_TYPE": 1,
"BATT_MONITOR": 4,
"BATT_ARM_VOLT": 11.0,
"MOT_BAT_VOLT_MAX": 16.8,
"MOT_SPIN_ARM": 0.10,
"MOT_SPIN_MIN": 0.15,
}
# Configure frame info and motor count
fc.get_frame_info.return_value = (1, 1) # Quad X
fc.is_battery_monitoring_enabled.return_value = True
fc.get_battery_status.return_value = ((12.4, 2.1), "")
fc.get_voltage_thresholds.return_value = (11.0, 16.8)
# Configure motor test methods
fc.test_motor.return_value = (True, "")
fc.test_all_motors.return_value = (True, "")
fc.test_motors_in_sequence.return_value = (True, "")
fc.stop_all_motors.return_value = (True, "")
# Configure set_param to update fc_parameters and return success
def set_param_side_effect(param_name: str, value: float) -> bool:
fc.fc_parameters[param_name] = value
return True
fc.set_param.side_effect = set_param_side_effect
# Configure fetch_param to return values from fc_parameters
> def fetch_param_side_effect(param_name: str) -> float | None:
E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
tests/test_data_model_motor_test.py:70: TypeError
github-actions / Test Results
test_user_can_get_parameter_value (tests.test_data_model_motor_test.TestMotorTestDataModelParameterManagement) with error
artifacts/coverage-3.9-xml/results-junit.xml [took 0s]
Raw output
failed on setup with "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'"
@pytest.fixture
def mock_flight_controller() -> MagicMock:
"""Fixture providing a mock flight controller with realistic test data."""
fc = MagicMock(spec=FlightController)
fc.master = MagicMock() # Simulate connected state
fc.fc_parameters = {
"FRAME_CLASS": 1,
"FRAME_TYPE": 1,
"BATT_MONITOR": 4,
"BATT_ARM_VOLT": 11.0,
"MOT_BAT_VOLT_MAX": 16.8,
"MOT_SPIN_ARM": 0.10,
"MOT_SPIN_MIN": 0.15,
}
# Configure frame info and motor count
fc.get_frame_info.return_value = (1, 1) # Quad X
fc.is_battery_monitoring_enabled.return_value = True
fc.get_battery_status.return_value = ((12.4, 2.1), "")
fc.get_voltage_thresholds.return_value = (11.0, 16.8)
# Configure motor test methods
fc.test_motor.return_value = (True, "")
fc.test_all_motors.return_value = (True, "")
fc.test_motors_in_sequence.return_value = (True, "")
fc.stop_all_motors.return_value = (True, "")
# Configure set_param to update fc_parameters and return success
def set_param_side_effect(param_name: str, value: float) -> bool:
fc.fc_parameters[param_name] = value
return True
fc.set_param.side_effect = set_param_side_effect
# Configure fetch_param to return values from fc_parameters
> def fetch_param_side_effect(param_name: str) -> float | None:
E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
tests/test_data_model_motor_test.py:70: TypeError
github-actions / Test Results
test_parameter_retrieval_returns_none_for_disconnected_controller (tests.test_data_model_motor_test.TestMotorTestDataModelParameterManagement) with error
artifacts/coverage-3.9-xml/results-junit.xml [took 0s]
Raw output
failed on setup with "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'"
@pytest.fixture
def mock_flight_controller() -> MagicMock:
"""Fixture providing a mock flight controller with realistic test data."""
fc = MagicMock(spec=FlightController)
fc.master = MagicMock() # Simulate connected state
fc.fc_parameters = {
"FRAME_CLASS": 1,
"FRAME_TYPE": 1,
"BATT_MONITOR": 4,
"BATT_ARM_VOLT": 11.0,
"MOT_BAT_VOLT_MAX": 16.8,
"MOT_SPIN_ARM": 0.10,
"MOT_SPIN_MIN": 0.15,
}
# Configure frame info and motor count
fc.get_frame_info.return_value = (1, 1) # Quad X
fc.is_battery_monitoring_enabled.return_value = True
fc.get_battery_status.return_value = ((12.4, 2.1), "")
fc.get_voltage_thresholds.return_value = (11.0, 16.8)
# Configure motor test methods
fc.test_motor.return_value = (True, "")
fc.test_all_motors.return_value = (True, "")
fc.test_motors_in_sequence.return_value = (True, "")
fc.stop_all_motors.return_value = (True, "")
# Configure set_param to update fc_parameters and return success
def set_param_side_effect(param_name: str, value: float) -> bool:
fc.fc_parameters[param_name] = value
return True
fc.set_param.side_effect = set_param_side_effect
# Configure fetch_param to return values from fc_parameters
> def fetch_param_side_effect(param_name: str) -> float | None:
E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
tests/test_data_model_motor_test.py:70: TypeError
Check failure on line 0 in tests.test_data_model_motor_test.TestMotorTestDataModelMotorTesting
github-actions / Test Results
test_user_can_test_individual_motor_successfully (tests.test_data_model_motor_test.TestMotorTestDataModelMotorTesting) with error
artifacts/coverage-3.9-xml/results-junit.xml [took 0s]
Raw output
failed on setup with "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'"
@pytest.fixture
def mock_flight_controller() -> MagicMock:
"""Fixture providing a mock flight controller with realistic test data."""
fc = MagicMock(spec=FlightController)
fc.master = MagicMock() # Simulate connected state
fc.fc_parameters = {
"FRAME_CLASS": 1,
"FRAME_TYPE": 1,
"BATT_MONITOR": 4,
"BATT_ARM_VOLT": 11.0,
"MOT_BAT_VOLT_MAX": 16.8,
"MOT_SPIN_ARM": 0.10,
"MOT_SPIN_MIN": 0.15,
}
# Configure frame info and motor count
fc.get_frame_info.return_value = (1, 1) # Quad X
fc.is_battery_monitoring_enabled.return_value = True
fc.get_battery_status.return_value = ((12.4, 2.1), "")
fc.get_voltage_thresholds.return_value = (11.0, 16.8)
# Configure motor test methods
fc.test_motor.return_value = (True, "")
fc.test_all_motors.return_value = (True, "")
fc.test_motors_in_sequence.return_value = (True, "")
fc.stop_all_motors.return_value = (True, "")
# Configure set_param to update fc_parameters and return success
def set_param_side_effect(param_name: str, value: float) -> bool:
fc.fc_parameters[param_name] = value
return True
fc.set_param.side_effect = set_param_side_effect
# Configure fetch_param to return values from fc_parameters
> def fetch_param_side_effect(param_name: str) -> float | None:
E TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
tests/test_data_model_motor_test.py:70: TypeError