1111"""
1212
1313import unittest
14- from unittest .mock import MagicMock , Mock , patch
14+ from unittest .mock import MagicMock , Mock , call , patch
1515
1616import pytest
1717
@@ -297,7 +297,7 @@ def test_output_params(self, mock_print_) -> None:
297297 output_params (defaults , "missionplanner" )
298298
299299 # Check if the print function was called with the correct parameters
300- expected_calls = [unittest . mock . call ("PARAM2,1" ), unittest . mock . call ("PARAM1,2" )]
300+ expected_calls = [call ("PARAM2,1" ), call ("PARAM1,2" )]
301301 mock_print_ .assert_has_calls (expected_calls , any_order = False )
302302
303303 @patch ("builtins.print" )
@@ -309,7 +309,7 @@ def test_output_params_missionplanner_non_numeric(self, mock_print_) -> None:
309309 output_params (defaults , "missionplanner" )
310310
311311 # Check if the print function was called with the correct parameters
312- expected_calls = [unittest . mock . call ("PARAM1,non-numeric" )]
312+ expected_calls = [call ("PARAM1,non-numeric" )]
313313 mock_print_ .assert_has_calls (expected_calls , any_order = False )
314314
315315 @patch ("builtins.print" )
@@ -323,8 +323,8 @@ def test_output_params_mavproxy(self, mock_print_) -> None:
323323
324324 # Check if the print function was called with the correct parameters
325325 expected_calls = [
326- unittest . mock . call ("%-15s %.6f" % ("PARAM1" , 1.0 )), # pylint: disable=consider-using-f-string
327- unittest . mock . call ("%-15s %.6f" % ("PARAM2" , 2.0 )), # pylint: disable=consider-using-f-string
326+ call ("%-15s %.6f" % ("PARAM1" , 1.0 )), # pylint: disable=consider-using-f-string
327+ call ("%-15s %.6f" % ("PARAM2" , 2.0 )), # pylint: disable=consider-using-f-string
328328 ]
329329 mock_print_ .assert_has_calls (expected_calls , any_order = False )
330330
@@ -339,9 +339,9 @@ def test_output_params_qgcs(self, mock_print_) -> None:
339339
340340 # Check if the print function was called with the correct parameters
341341 expected_calls = [
342- unittest . mock . call ("\n # # Vehicle-Id Component-Id Name Value Type\n " ),
343- unittest . mock . call ("%u %u %-15s %.6f %u" % (1 , 1 , "PARAM1" , 1.0 , 9 )), # pylint: disable=consider-using-f-string
344- unittest . mock . call ("%u %u %-15s %.6f %u" % (1 , 1 , "PARAM2" , 2.0 , 9 )), # pylint: disable=consider-using-f-string
342+ call ("\n # # Vehicle-Id Component-Id Name Value Type\n " ),
343+ call ("%u %u %-15s %.6f %u" % (1 , 1 , "PARAM1" , 1.0 , 9 )), # pylint: disable=consider-using-f-string
344+ call ("%u %u %-15s %.6f %u" % (1 , 1 , "PARAM2" , 2.0 , 9 )), # pylint: disable=consider-using-f-string
345345 ]
346346 mock_print_ .assert_has_calls (expected_calls , any_order = False )
347347
@@ -356,9 +356,9 @@ def test_output_params_qgcs_2_4(self, mock_print_) -> None:
356356
357357 # Check if the print function was called with the correct parameters
358358 expected_calls = [
359- unittest . mock . call ("\n # # Vehicle-Id Component-Id Name Value Type\n " ),
360- unittest . mock . call ("%u %u %-15s %.6f %u" % (2 , 4 , "PARAM1" , 1.0 , 9 )), # pylint: disable=consider-using-f-string
361- unittest . mock . call ("%u %u %-15s %.6f %u" % (2 , 4 , "PARAM2" , 2.0 , 9 )), # pylint: disable=consider-using-f-string
359+ call ("\n # # Vehicle-Id Component-Id Name Value Type\n " ),
360+ call ("%u %u %-15s %.6f %u" % (2 , 4 , "PARAM1" , 1.0 , 9 )), # pylint: disable=consider-using-f-string
361+ call ("%u %u %-15s %.6f %u" % (2 , 4 , "PARAM2" , 2.0 , 9 )), # pylint: disable=consider-using-f-string
362362 ]
363363 mock_print_ .assert_has_calls (expected_calls , any_order = False )
364364
@@ -373,10 +373,10 @@ def test_output_params_qgcs_SYSID_THISMAV(self, mock_print_) -> None: # noqa: N
373373
374374 # Check if the print function was called with the correct parameters
375375 expected_calls = [
376- unittest . mock . call ("\n # # Vehicle-Id Component-Id Name Value Type\n " ),
377- unittest . mock . call ("%u %u %-15s %.6f %u" % (3 , 7 , "PARAM1" , 1.0 , 9 )), # pylint: disable=consider-using-f-string
378- unittest . mock . call ("%u %u %-15s %.6f %u" % (3 , 7 , "PARAM2" , 2.0 , 9 )), # pylint: disable=consider-using-f-string
379- unittest . mock . call ("%u %u %-15s %.6f %u" % (3 , 7 , "SYSID_THISMAV" , 3.0 , 9 )), # pylint: disable=consider-using-f-string
376+ call ("\n # # Vehicle-Id Component-Id Name Value Type\n " ),
377+ call ("%u %u %-15s %.6f %u" % (3 , 7 , "PARAM1" , 1.0 , 9 )), # pylint: disable=consider-using-f-string
378+ call ("%u %u %-15s %.6f %u" % (3 , 7 , "PARAM2" , 2.0 , 9 )), # pylint: disable=consider-using-f-string
379+ call ("%u %u %-15s %.6f %u" % (3 , 7 , "SYSID_THISMAV" , 3.0 , 9 )), # pylint: disable=consider-using-f-string
380380 ]
381381 mock_print_ .assert_has_calls (expected_calls , any_order = False )
382382
@@ -420,7 +420,7 @@ def test_output_params_integer(self, mock_print_) -> None:
420420 output_params (defaults , "missionplanner" )
421421
422422 # Check if the print function was called with the correct parameters
423- expected_calls = [unittest . mock . call ("PARAM1,1.01" ), unittest . mock . call ("PARAM2,2" )]
423+ expected_calls = [call ("PARAM1,1.01" ), call ("PARAM2,2" )]
424424 mock_print_ .assert_has_calls (expected_calls , any_order = False )
425425
426426 @patch ("builtins.print" )
0 commit comments