project_name string | class_name string | class_modifiers string | class_implements int64 | class_extends int64 | function_name string | function_body string | cyclomatic_complexity int64 | NLOC int64 | num_parameter int64 | num_token int64 | num_variable int64 | start_line int64 | end_line int64 | function_index int64 | function_params string | function_variable string | function_return_type string | function_body_line_type string | function_num_functions int64 | function_num_lines int64 | outgoing_function_count int64 | outgoing_function_names string | incoming_function_count int64 | incoming_function_names string | lexical_representation string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_bundle_warning_suppression | def test_cli_bundle_warning_suppression(fresh_deadline_config, temp_job_bundle_dir):"""Test that warnings are suppressed for paths in known_asset_paths."""# Set up configurationconfig.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)config.set_setting("settings.auto_acc... | 2 | 79 | 2 | 439 | 5 | 255 | 360 | 255 | fresh_deadline_config,temp_job_bundle_dir | ['job_bundle_file_path', 'warning_message', 'runner', 'result', 'external_file_path'] | None | {"Assign": 10, "Expr": 12, "Try": 1, "With": 8} | 29 | 106 | 29 | ["config.set_setting", "config.set_setting", "config.set_setting", "open", "os.path.join", "f.write", "os.path.join", "open", "f.write", "tempfile.NamedTemporaryFile", "temp_file.write", "open", "os.path.join", "json.dump", "patch_calls_for_create_job_from_job_bundle", "patch.object", "CliRunner", "runner.invoke", "moc... | 0 | [] | The function (test_cli_bundle_warning_suppression) defined within the public class called public.The function start at line 255 and ends at 360. It contains 79 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [255.0] and does not return any value. It declares 29.0 functions, ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_config_show_defaults | def test_cli_config_show_defaults(fresh_deadline_config):"""Confirm that the CLI interface prints out all the configurationfile data, when the configuration is default"""runner = CliRunner()result = runner.invoke(main, ["config", "show"])assert result.exit_code == 0settings = config_file.SETTINGS# The command prints ou... | 2 | 10 | 1 | 82 | 3 | 22 | 42 | 22 | fresh_deadline_config | ['runner', 'result', 'settings'] | None | {"Assign": 3, "Expr": 1, "For": 1} | 7 | 21 | 7 | ["CliRunner", "runner.invoke", "len", "settings.keys", "settings.keys", "str", "config_file.get_setting_default"] | 0 | [] | The function (test_cli_config_show_defaults) defined within the public class called public.The function start at line 22 and ends at 42. It contains 10 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 7.0 functions, and It has 7... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_default_log_level | def test_default_log_level(fresh_deadline_config):"""We must make sure that DEBUG is not the default log level"""assert config.get_setting("settings.log_level") == "WARNING"assert config.get_setting_default("settings.log_level") == "WARNING" | 1 | 3 | 1 | 24 | 0 | 45 | 48 | 45 | fresh_deadline_config | [] | None | {"Expr": 1} | 2 | 4 | 2 | ["config.get_setting", "config.get_setting_default"] | 0 | [] | The function (test_default_log_level) defined within the public class called public.The function start at line 45 and ends at 48. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 funct... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_log_level_updated | def test_log_level_updated(fresh_deadline_config, caplog, log_level):"""Tests that the logging level is set to debug"""# GIVENconfig.set_setting("settings.log_level", log_level)with caplog.at_level(logging.DEBUG), patch.object(deadline.client.cli._main.logging, "basicConfig") as mock_basic_config:# WHENCliRunner().invo... | 2 | 14 | 3 | 112 | 0 | 61 | 81 | 61 | fresh_deadline_config,caplog,log_level | [] | None | {"Expr": 4, "With": 1} | 7 | 21 | 7 | ["config.set_setting", "caplog.at_level", "patch.object", "invoke", "CliRunner", "mock_basic_config.assert_called_once_with", "pytest.mark.parametrize"] | 0 | [] | The function (test_log_level_updated) defined within the public class called public.The function start at line 61 and ends at 81. It contains 14 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [61.0] and does not return any value. It declares 7.0 functions, and It has 7.0 f... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_config_show_modified_config | def test_cli_config_show_modified_config(fresh_deadline_config):"""Confirm that the CLI interface prints out all the configurationfile data, when the configuration is default"""config.set_setting("deadline-cloud-monitor.path", "/User/auser/bin/DeadlineCloudMonitor")config.set_setting("defaults.aws_profile_name", "EnvVa... | 1 | 32 | 1 | 246 | 2 | 84 | 124 | 84 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 2, "Expr": 17} | 20 | 41 | 20 | ["config.set_setting", "config.set_setting", "config.set_setting", "config.set_setting", "config.set_setting", "config.set_setting", "config.set_setting", "config.set_setting", "config.set_setting", "config.set_setting", "config.set_setting", "config.set_setting", "config.set_setting", "config.set_setting", "config.set... | 0 | [] | The function (test_cli_config_show_modified_config) defined within the public class called public.The function start at line 84 and ends at 124. It contains 32 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 20.0 functions, and ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_config_show_json_output | def test_cli_config_show_json_output(fresh_deadline_config):"""Confirm that the CLI interface prints out all the configurationfile data, when the configuration is default"""runner = CliRunner()result = runner.invoke(main, ["config", "show", "--output", "json"])assert result.exit_code == 0expected_output = {}for setting... | 2 | 9 | 1 | 91 | 3 | 127 | 142 | 127 | fresh_deadline_config | ['expected_output', 'runner', 'result'] | None | {"Assign": 5, "Expr": 1, "For": 1} | 7 | 16 | 7 | ["CliRunner", "runner.invoke", "config.config_file.SETTINGS.keys", "config.config_file.get_setting", "str", "config.config_file.get_config_file_path", "json.loads"] | 0 | [] | The function (test_cli_config_show_json_output) defined within the public class called public.The function start at line 127 and ends at 142. It contains 9 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 7.0 functions, and It h... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_config_settings_via_cli_roundtrip | def test_config_settings_via_cli_roundtrip(fresh_deadline_config, setting_name, default_value, alternate_value):"""Test that each setting we support has the right default and roundtrips changes when called via CLI"""runner = CliRunner()result = runner.invoke(main, ["config", "get", setting_name])assert result.exit_code... | 1 | 19 | 4 | 191 | 2 | 146 | 171 | 146 | fresh_deadline_config,setting_name,default_value,alternate_value | ['runner', 'result'] | None | {"Assign": 6, "Expr": 1} | 16 | 26 | 16 | ["CliRunner", "runner.invoke", "result.output.strip", "str", "runner.invoke", "str", "result.output.strip", "runner.invoke", "result.output.strip", "str", "runner.invoke", "result.output.strip", "runner.invoke", "result.output.strip", "str", "pytest.mark.parametrize"] | 0 | [] | The function (test_config_settings_via_cli_roundtrip) defined within the public class called public.The function start at line 146 and ends at 171. It contains 19 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [146.0] and does not return any value. It declares 16.0 function... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_config_set_setting_nonexistant | def test_config_set_setting_nonexistant(fresh_deadline_config):"""Test that we get an error with a non-existent setting."""runner = CliRunner()result = runner.invoke(main, ["config", "set", "settings.doesnt_exist", "value"])assert result.exit_code == 1assert "doesnt_exist" in result.output | 1 | 5 | 1 | 41 | 2 | 174 | 181 | 174 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 2, "Expr": 1} | 2 | 8 | 2 | ["CliRunner", "runner.invoke"] | 0 | [] | The function (test_config_set_setting_nonexistant) defined within the public class called public.The function start at line 174 and ends at 181. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and I... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_config_command_setting_nonexistant | def test_config_command_setting_nonexistant(config_command, fresh_deadline_config):"""Test that we get an error with a non-existent setting."""runner = CliRunner()result = runner.invoke(main, ["config", config_command, "settings.doesnt_exist"])assert result.exit_code == 1assert "doesnt_exist" in result.output | 1 | 5 | 2 | 41 | 2 | 197 | 204 | 197 | config_command,fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 2, "Expr": 1} | 5 | 8 | 5 | ["CliRunner", "runner.invoke", "pytest.mark.parametrize", "pytest.param", "pytest.param"] | 0 | [] | The function (test_config_command_setting_nonexistant) defined within the public class called public.The function start at line 197 and ends at 204. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [197.0] and does not return any value. It declares 5.0 functions... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_farm_list | def test_cli_farm_list(fresh_deadline_config, mock_telemetry):"""Confirm that the CLI interface prints out the expected list offarms, given mock data."""with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").list_farms.return_value = {"farms": MOCK_FARMS_LIST}runner = Cli... | 1 | 9 | 2 | 73 | 2 | 33 | 53 | 33 | fresh_deadline_config,mock_telemetry | ['runner', 'result'] | None | {"Assign": 3, "Expr": 1, "With": 1} | 5 | 21 | 5 | ["patch.object", "client", "session_mock", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_cli_farm_list) defined within the public class called public.The function start at line 33 and ends at 53. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [33.0] and does not return any value. It declares 5.0 functions, and It has 5.0 functi... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_farm_list_override_profile | def test_cli_farm_list_override_profile(fresh_deadline_config):"""Confirms that the --profile option overrides the option to boto3.Session."""# set the "user identities" property to True so it doesn't probe the boto3.Session# for configuration.config.set_setting("defaults.aws_profile_name", "NonDefaultProfileName")conf... | 1 | 12 | 1 | 122 | 2 | 56 | 75 | 56 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 4, "Expr": 6, "With": 1} | 14 | 20 | 14 | ["config.set_setting", "config.set_setting", "patch.object", "client", "session_mock", "_session.get_scoped_config", "session_mock", "session_mock.reset_mock", "CliRunner", "runner.invoke", "session_mock.assert_called_with", "list_farms.assert_called_once_with", "client", "session_mock"] | 0 | [] | The function (test_cli_farm_list_override_profile) defined within the public class called public.The function start at line 56 and ends at 75. It contains 12 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 14.0 functions, and I... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_farm_list_client_error | def test_cli_farm_list_client_error(fresh_deadline_config):with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").list_farms.side_effect = ClientError({"Error": {"Message": "A botocore client error"}}, "client error")runner = CliRunner()result = runner.invoke(main, ["farm... | 1 | 10 | 1 | 83 | 2 | 78 | 89 | 78 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 3, "With": 1} | 6 | 12 | 6 | ["patch.object", "client", "session_mock", "ClientError", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_cli_farm_list_client_error) defined within the public class called public.The function start at line 78 and ends at 89. It contains 10 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It has... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_farm_get | def test_cli_farm_get(fresh_deadline_config, mock_telemetry):"""Confirm that the CLI interface prints out the expected farm, given mock data."""config.set_setting("defaults.farm_id", "farm-0123456789abcdef0123456789abcdef")with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadl... | 1 | 13 | 2 | 97 | 2 | 92 | 115 | 92 | fresh_deadline_config,mock_telemetry | ['runner', 'result'] | None | {"Assign": 3, "Expr": 3, "With": 1} | 9 | 24 | 9 | ["config.set_setting", "patch.object", "client", "session_mock", "CliRunner", "runner.invoke", "get_farm.assert_called_once_with", "client", "session_mock"] | 0 | [] | The function (test_cli_farm_get) defined within the public class called public.The function start at line 92 and ends at 115. It contains 13 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [92.0] and does not return any value. It declares 9.0 functions, and It has 9.0 funct... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_farm_get_override_profile | def test_cli_farm_get_override_profile(fresh_deadline_config):"""Confirms that the --profile option overrides the option to boto3.Session."""# set the farm id for the overridden profileconfig.set_setting("defaults.aws_profile_name", "NonDefaultProfileName")config.set_setting("defaults.farm_id", "farm-overriddenid")conf... | 1 | 12 | 1 | 117 | 2 | 118 | 136 | 118 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 3, "Expr": 7, "With": 1} | 13 | 19 | 13 | ["config.set_setting", "config.set_setting", "config.set_setting", "patch.object", "client", "session_mock", "session_mock.reset_mock", "CliRunner", "runner.invoke", "session_mock.assert_called_once_with", "get_farm.assert_called_once_with", "client", "session_mock"] | 0 | [] | The function (test_cli_farm_get_override_profile) defined within the public class called public.The function start at line 118 and ends at 136. It contains 12 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 13.0 functions, and ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_farm_get_no_default_set | def test_cli_farm_get_no_default_set(fresh_deadline_config):"""Confirm that the CLI interface prints out the expected farm, given mock data."""with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").get_farm.return_value = MOCK_FARMS_LIST[0]runner = CliRunner()result = run... | 1 | 7 | 1 | 68 | 2 | 139 | 151 | 139 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 3, "Expr": 1, "With": 1} | 5 | 13 | 5 | ["patch.object", "client", "session_mock", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_cli_farm_get_no_default_set) defined within the public class called public.The function start at line 139 and ends at 151. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It h... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_farm_get_explicit_farm_id | def test_cli_farm_get_explicit_farm_id(fresh_deadline_config, mock_telemetry):"""Confirm that the CLI interface prints out the expected farm, given mock data."""with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").get_farm.return_value = MOCK_FARMS_LIST[0]runner = CliRu... | 1 | 15 | 2 | 94 | 2 | 154 | 179 | 154 | fresh_deadline_config,mock_telemetry | ['runner', 'result'] | None | {"Assign": 3, "Expr": 2, "With": 1} | 8 | 26 | 8 | ["patch.object", "client", "session_mock", "CliRunner", "runner.invoke", "get_farm.assert_called_once_with", "client", "session_mock"] | 0 | [] | The function (test_cli_farm_get_explicit_farm_id) defined within the public class called public.The function start at line 154 and ends at 179. It contains 15 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [154.0] and does not return any value. It declares 8.0 functions, an... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_fleet_list | def test_cli_fleet_list(fresh_deadline_config, mock_telemetry):"""Confirm that the CLI interface prints out the expected list offleets, given mock data."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").list_fleet... | 1 | 10 | 2 | 81 | 2 | 53 | 75 | 53 | fresh_deadline_config,mock_telemetry | ['runner', 'result'] | None | {"Assign": 3, "Expr": 2, "With": 1} | 6 | 23 | 6 | ["config.set_setting", "patch.object", "client", "session_mock", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_cli_fleet_list) defined within the public class called public.The function start at line 53 and ends at 75. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [53.0] and does not return any value. It declares 6.0 functions, and It has 6.0 func... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_fleet_list_client_error | def test_cli_fleet_list_client_error(fresh_deadline_config):config.set_setting("defaults.farm_id", MOCK_FARM_ID)with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").list_fleets.side_effect = ClientError({"Error": {"Message": "A botocore client error"}}, "client error")r... | 1 | 11 | 1 | 91 | 2 | 78 | 91 | 78 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 3, "Expr": 1, "With": 1} | 7 | 14 | 7 | ["config.set_setting", "patch.object", "client", "session_mock", "ClientError", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_cli_fleet_list_client_error) defined within the public class called public.The function start at line 78 and ends at 91. It contains 11 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 7.0 functions, and It ha... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_fleet_get | def test_cli_fleet_get(fresh_deadline_config):"""Confirm that the CLI interface prints out the expected fleet, given mock data."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").get_fleet.return_value = MOCK_FLEET... | 1 | 13 | 1 | 103 | 2 | 94 | 132 | 94 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 3, "Expr": 3, "With": 1} | 9 | 39 | 9 | ["config.set_setting", "patch.object", "client", "session_mock", "CliRunner", "runner.invoke", "get_fleet.assert_called_once_with", "client", "session_mock"] | 0 | [] | The function (test_cli_fleet_get) defined within the public class called public.The function start at line 94 and ends at 132. It contains 13 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 9.0 functions, and It has 9.0 functio... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_fleet_get_with_queue_id | def test_cli_fleet_get_with_queue_id(fresh_deadline_config):"""Confirm that the CLI interface prints out the expected fleets, given mock dataand a queue id parameter."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)with patch.object(api._session, "get_boto3_se... | 1 | 26 | 1 | 176 | 2 | 135 | 211 | 135 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 5, "Expr": 3, "With": 1} | 12 | 77 | 12 | ["config.set_setting", "config.set_setting", "patch.object", "client", "session_mock", "client", "session_mock", "deepcopy", "client", "session_mock", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_cli_fleet_get_with_queue_id) defined within the public class called public.The function start at line 135 and ends at 211. It contains 26 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 12.0 functions, and It... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_fleet_get_override_profile | def test_cli_fleet_get_override_profile(fresh_deadline_config):"""Confirms that the --profile option overrides the option to boto3.Session."""# set the farm id for the overridden profileconfig.set_setting("defaults.aws_profile_name", "NonDefaultProfileName")config.set_setting("defaults.farm_id", "farm-overriddenid")con... | 1 | 17 | 1 | 126 | 2 | 214 | 237 | 214 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 3, "Expr": 7, "With": 1} | 13 | 24 | 13 | ["config.set_setting", "config.set_setting", "config.set_setting", "patch.object", "client", "session_mock", "session_mock.reset_mock", "CliRunner", "runner.invoke", "session_mock.assert_called_once_with", "get_fleet.assert_called_once_with", "client", "session_mock"] | 0 | [] | The function (test_cli_fleet_get_override_profile) defined within the public class called public.The function start at line 214 and ends at 237. It contains 17 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 13.0 functions, and ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_fleet_get_both_fleet_id_and_queue_id_provided | def test_cli_fleet_get_both_fleet_id_and_queue_id_provided(fresh_deadline_config):"""Confirm that the CLI interface fails when both fleet and queue id are provided"""config.set_setting("defaults.farm_id", "farm-overriddenid")with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("dea... | 1 | 10 | 1 | 84 | 2 | 240 | 255 | 240 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 3, "Expr": 2, "With": 1} | 6 | 16 | 6 | ["config.set_setting", "patch.object", "client", "session_mock", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_cli_fleet_get_both_fleet_id_and_queue_id_provided) defined within the public class called public.The function start at line 240 and ends at 255. It contains 10 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_fleet_get_no_fleet_id_provided | def test_cli_fleet_get_no_fleet_id_provided(fresh_deadline_config):"""Confirm that the CLI interface fails when no fleet id is provided"""config.set_setting("defaults.farm_id", "farm-overriddenid")with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").get_fleet.return_val... | 1 | 10 | 1 | 78 | 2 | 258 | 273 | 258 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 3, "Expr": 2, "With": 1} | 6 | 16 | 6 | ["config.set_setting", "patch.object", "client", "session_mock", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_cli_fleet_get_no_fleet_id_provided) defined within the public class called public.The function start at line 258 and ends at 273. It contains 10 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, a... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_fleet_get_explicit_farm_id | def test_cli_fleet_get_explicit_farm_id(fresh_deadline_config):"""Confirm that the CLI interface prints out the expected fleet, given mock data."""with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").get_fleet.return_value = MOCK_FLEETS_LIST[0]runner = CliRunner()result... | 1 | 15 | 1 | 100 | 2 | 276 | 316 | 276 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 3, "Expr": 2, "With": 1} | 8 | 41 | 8 | ["patch.object", "client", "session_mock", "CliRunner", "runner.invoke", "get_fleet.assert_called_once_with", "client", "session_mock"] | 0 | [] | The function (test_cli_fleet_get_explicit_farm_id) defined within the public class called public.The function start at line 276 and ends at 316. It contains 15 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 8.0 functions, and ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_parse_query_string | def test_parse_query_string():"""A few successful test cases."""assert parse_query_string("ab-c=def&x=73&xyz=testing-value", ["ab-c", "x", "xyz"], []) == {"ab_c": "def","x": "73","xyz": "testing-value",}assert parse_query_string("a=b&c=d", ["a", "c", "f", "g"], ["a", "c"]) == {"a": "b","c": "d",} | 1 | 10 | 0 | 68 | 0 | 47 | 59 | 47 | [] | None | {"Expr": 1} | 2 | 13 | 2 | ["parse_query_string", "parse_query_string"] | 0 | [] | The function (test_parse_query_string) defined within the public class called public.The function start at line 47 and ends at 59. It contains 10 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 fun... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_parse_query_string_missing_required | def test_parse_query_string_missing_required():"""Tests with missing required parameters"""with pytest.raises(DeadlineOperationError) as excinfo:parse_query_string("a-1=b&c=d", ["a-1", "c", "missing-required", "g"], ["a-1", "c", "missing-required"])assert "did not contain the required parameter" in str(excinfo)assert "... | 1 | 17 | 0 | 117 | 0 | 62 | 83 | 62 | [] | None | {"Expr": 3, "With": 2} | 10 | 22 | 10 | ["pytest.raises", "parse_query_string", "str", "str", "pytest.raises", "parse_query_string", "str", "str", "str", "str"] | 0 | [] | The function (test_parse_query_string_missing_required) defined within the public class called public.The function start at line 62 and ends at 83. It contains 17 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 10.0 functions, a... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_parse_query_string_extra_parameters | def test_parse_query_string_extra_parameters():"""Tests with parameters that are not supposed to be there"""with pytest.raises(DeadlineOperationError) as excinfo:parse_query_string("a=b&c=d&extra-parameter=3", ["a", "c"], ["a"])assert "contained unsupported parameter" in str(excinfo)assert "extra-parameter" in str(exci... | 1 | 15 | 0 | 99 | 0 | 86 | 105 | 86 | [] | None | {"Expr": 3, "With": 2} | 10 | 20 | 10 | ["pytest.raises", "parse_query_string", "str", "str", "pytest.raises", "parse_query_string", "str", "str", "str", "str"] | 0 | [] | The function (test_parse_query_string_extra_parameters) defined within the public class called public.The function start at line 86 and ends at 105. It contains 15 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 10.0 functions, ... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_parse_query_string_duplicate_parameters | def test_parse_query_string_duplicate_parameters():"""Tests with a repeated parameter"""with pytest.raises(DeadlineOperationError) as excinfo:parse_query_string("duplicated-param=b&c=d&duplicated-param=e", ["duplicated-param", "c"], ["c"])assert "provided multiple times" in str(excinfo)assert "duplicated-param" in str(... | 1 | 7 | 0 | 43 | 0 | 108 | 117 | 108 | [] | None | {"Expr": 2, "With": 1} | 4 | 10 | 4 | ["pytest.raises", "parse_query_string", "str", "str"] | 0 | [] | The function (test_parse_query_string_duplicate_parameters) defined within the public class called public.The function start at line 108 and ends at 117. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 function... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_validate_resource_ids_successful | def test_validate_resource_ids_successful(ids: Dict[str, str]):"""A few successful test cases."""validate_resource_ids(ids) | 1 | 2 | 1 | 17 | 0 | 144 | 148 | 144 | ids | [] | None | {"Expr": 2} | 2 | 5 | 2 | ["validate_resource_ids", "pytest.mark.parametrize"] | 0 | [] | The function (test_validate_resource_ids_successful) defined within the public class called public.The function start at line 144 and ends at 148. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_validate_resource_ids_failed | def test_validate_resource_ids_failed(ids: Dict[str, str], exception_message: str):"""Tests with invalid IDs."""with pytest.raises(DeadlineOperationError) as excinfo:validate_resource_ids(ids)assert exception_message in str(excinfo) | 1 | 4 | 2 | 38 | 0 | 205 | 211 | 205 | ids,exception_message | [] | None | {"Expr": 2, "With": 1} | 4 | 7 | 4 | ["pytest.raises", "validate_resource_ids", "str", "pytest.mark.parametrize"] | 0 | [] | The function (test_validate_resource_ids_failed) defined within the public class called public.The function start at line 205 and ends at 211. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [205.0] and does not return any value. It declares 4.0 functions, and ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_validate_id_format_successful | def test_validate_id_format_successful(resource_type: str, full_id_str: str):"""A few successful test cases."""assert validate_id_format(resource_type, full_id_str) | 1 | 2 | 2 | 19 | 0 | 224 | 228 | 224 | resource_type,full_id_str | [] | None | {"Expr": 1} | 2 | 5 | 2 | ["validate_id_format", "pytest.mark.parametrize"] | 0 | [] | The function (test_validate_id_format_successful) defined within the public class called public.The function start at line 224 and ends at 228. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [224.0] and does not return any value. It declares 2.0 functions, and... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_validate_id_format_failed | def test_validate_id_format_failed(resource_type: str, full_id_str: str):"""Tests with invalid IDs."""assert not validate_id_format(resource_type, full_id_str) | 1 | 2 | 2 | 20 | 0 | 251 | 255 | 251 | resource_type,full_id_str | [] | None | {"Expr": 1} | 2 | 5 | 2 | ["validate_id_format", "pytest.mark.parametrize"] | 0 | [] | The function (test_validate_id_format_failed) defined within the public class called public.The function start at line 251 and ends at 255. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [251.0] and does not return any value. It declares 2.0 functions, and It... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_handle_web_url_download_output_only_required_input | def test_cli_handle_web_url_download_output_only_required_input(fresh_deadline_config):"""Confirm that the CLI interface prints out the expected list offarms, given mock data."""set_setting("settings.auto_accept", "true")with patch.object(api, "get_boto3_client") as boto3_client_mock, patch.object(job_group, "OutputDow... | 1 | 43 | 1 | 224 | 5 | 258 | 309 | 258 | fresh_deadline_config | ['mock_download', 'mock_host_path_format_name', 'web_url', 'runner', 'result'] | None | {"Assign": 9, "Expr": 4, "With": 1} | 15 | 52 | 15 | ["set_setting", "patch.object", "patch.object", "patch.object", "MagicMock", "DownloadSummaryStatistics", "PathFormat.get_host_path_format_string", "boto3_client_mock", "PathFormat", "boto3_client_mock", "CliRunner", "runner.invoke", "MockOutputDownloader.assert_called_once_with", "JobAttachmentS3Settings", "mock_downl... | 0 | [] | The function (test_cli_handle_web_url_download_output_only_required_input) defined within the public class called public.The function start at line 258 and ends at 309. It contains 43 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It decla... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_handle_web_url_download_output_with_optional_input | def test_cli_handle_web_url_download_output_with_optional_input(fresh_deadline_config):"""Confirm that the CLI interface prints out the expected list offarms, given mock data."""set_setting("settings.auto_accept", "true")with patch.object(api, "get_boto3_client") as boto3_client_mock, patch.object(job_group, "OutputDow... | 1 | 48 | 1 | 242 | 5 | 312 | 368 | 312 | fresh_deadline_config | ['mock_download', 'mock_host_path_format_name', 'web_url', 'runner', 'result'] | None | {"Assign": 9, "Expr": 4, "With": 1} | 16 | 57 | 16 | ["set_setting", "patch.object", "patch.object", "patch.object", "patch.object", "MagicMock", "DownloadSummaryStatistics", "PathFormat.get_host_path_format_string", "boto3_client_mock", "PathFormat", "boto3_client_mock", "CliRunner", "runner.invoke", "MockOutputDownloader.assert_called_once_with", "JobAttachmentS3Settin... | 0 | [] | The function (test_cli_handle_web_url_download_output_with_optional_input) defined within the public class called public.The function start at line 312 and ends at 368. It contains 48 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It decla... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_handle_web_url_unsupported_protocol_scheme | def test_cli_handle_web_url_unsupported_protocol_scheme(fresh_deadline_config):"""Tests that an error is returned when an unsupported url is passed to the handle-web-url command"""runner = CliRunner()result = runner.invoke(main, ["handle-web-url", "https://sketchy-website.com"])assert "URL scheme https is not supported... | 1 | 5 | 1 | 37 | 2 | 371 | 379 | 371 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 2, "Expr": 1} | 2 | 9 | 2 | ["CliRunner", "runner.invoke"] | 0 | [] | The function (test_cli_handle_web_url_unsupported_protocol_scheme) defined within the public class called public.The function start at line 371 and ends at 379. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 f... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_handle_web_url_command_not_allowlisted | def test_cli_handle_web_url_command_not_allowlisted(fresh_deadline_config):"""Tests that a command that isn't explicitly allowlisted isn't ran."""runner = CliRunner()result = runner.invoke(main, ["handle-web-url", "deadline://config"])assert "Command config is not supported through handle-web-url." in result.outputasse... | 1 | 5 | 1 | 37 | 2 | 382 | 390 | 382 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 2, "Expr": 1} | 2 | 9 | 2 | ["CliRunner", "runner.invoke"] | 0 | [] | The function (test_cli_handle_web_url_command_not_allowlisted) defined within the public class called public.The function start at line 382 and ends at 390. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 funct... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_handle_web_url_command_not_allowlisted_with_prompt | def test_handle_web_url_command_not_allowlisted_with_prompt(fresh_deadline_config):"""Tests that a command that isn't explicitly allowlisted isn't ran. Test with a prompt for the exit."""runner = CliRunner()result = runner.invoke(main,["handle-web-url", "deadline://config", "--prompt-when-complete"],input="\n",)assert ... | 1 | 9 | 1 | 44 | 2 | 393 | 405 | 393 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 2, "Expr": 1} | 2 | 13 | 2 | ["CliRunner", "runner.invoke"] | 0 | [] | The function (test_handle_web_url_command_not_allowlisted_with_prompt) defined within the public class called public.The function start at line 393 and ends at 405. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_handle_web_url_missing_required_args | def test_handle_web_url_missing_required_args(fresh_deadline_config, url: str, missing_names: List[str]):"""Tests an error is returned when a required argument is missing."""runner = CliRunner()result = runner.invoke(main,["handle-web-url",url,],)assert "The URL query did not contain the required parameter(s)" in resul... | 2 | 15 | 3 | 61 | 2 | 418 | 436 | 418 | fresh_deadline_config,url,missing_names | ['runner', 'result'] | None | {"Assign": 2, "Expr": 1, "For": 1} | 3 | 19 | 3 | ["CliRunner", "runner.invoke", "pytest.mark.parametrize"] | 0 | [] | The function (test_handle_web_url_missing_required_args) defined within the public class called public.The function start at line 418 and ends at 436. It contains 15 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [418.0] and does not return any value. It declares 3.0 functi... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_handle_web_url_incorrect_install_option | def test_handle_web_url_incorrect_install_option(fresh_deadline_config, install_option):"""Tests that the install/uninstall commands cannot be used with a URL"""runner = CliRunner()result = runner.invoke(main,["handle-web-url", "deadline://config", install_option],)assert ("The --install, --uninstall and --all-users op... | 1 | 11 | 2 | 44 | 2 | 440 | 454 | 440 | fresh_deadline_config,install_option | ['runner', 'result'] | None | {"Assign": 2, "Expr": 1} | 3 | 15 | 3 | ["CliRunner", "runner.invoke", "pytest.mark.parametrize"] | 0 | [] | The function (test_handle_web_url_incorrect_install_option) defined within the public class called public.The function start at line 440 and ends at 454. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [440.0] and does not return any value. It declares 3.0 fun... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_handle_web_url_both_install_and_uninstall | def test_handle_web_url_both_install_and_uninstall(fresh_deadline_config):"""Tests that install & uninstall cannot be used together"""runner = CliRunner()result = runner.invoke(main,["handle-web-url", "--install", "--uninstall"],)assert "Only one of the --install and --uninstall options may be provided." in result.outp... | 1 | 8 | 1 | 40 | 2 | 457 | 468 | 457 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 2, "Expr": 1} | 2 | 12 | 2 | ["CliRunner", "runner.invoke"] | 0 | [] | The function (test_handle_web_url_both_install_and_uninstall) defined within the public class called public.The function start at line 457 and ends at 468. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functi... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_handle_web_url_require_url_or_install_option | def test_handle_web_url_require_url_or_install_option(fresh_deadline_config):"""Tests that install & uninstall cannot be used together"""runner = CliRunner()result = runner.invoke(main,["handle-web-url"],)assert "At least one of a URL, --install, or --uninstall must be provided." in result.outputassert result.exit_code... | 1 | 8 | 1 | 36 | 2 | 471 | 482 | 471 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 2, "Expr": 1} | 2 | 12 | 2 | ["CliRunner", "runner.invoke"] | 0 | [] | The function (test_handle_web_url_require_url_or_install_option) defined within the public class called public.The function start at line 471 and ends at 482. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 fun... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_handle_web_url_install | def test_cli_handle_web_url_install(fresh_deadline_config, install_command, all_users):"""Confirm that the install command calls the implementation function"""with patch.object(handle_web_url_command, f"{install_command}_deadline_web_url_handler") as mock_install:runner = CliRunner()cli_options = ["handle-web-url", f"-... | 2 | 11 | 3 | 69 | 3 | 487 | 501 | 487 | fresh_deadline_config,install_command,all_users | ['result', 'runner', 'cli_options'] | None | {"Assign": 3, "Expr": 3, "If": 1, "With": 1} | 7 | 15 | 7 | ["patch.object", "CliRunner", "cli_options.append", "runner.invoke", "mock_install.assert_called_once_with", "pytest.mark.parametrize", "pytest.mark.parametrize"] | 0 | [] | The function (test_cli_handle_web_url_install) defined within the public class called public.The function start at line 487 and ends at 501. It contains 11 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [487.0] and does not return any value. It declares 7.0 functions, and ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_handle_web_url_install_current_user_monkeypatched_windows | def test_cli_handle_web_url_install_current_user_monkeypatched_windows(fresh_deadline_config, monkeypatch):"""Tests the registry installation calls for Windows URL handler installers.By monkeypatching, we can test this on any OS.This test is pretty inflexible, it verifies that the specific set of known-good winregcalls... | 1 | 34 | 2 | 206 | 3 | 504 | 549 | 504 | fresh_deadline_config,monkeypatch | ['runner', 'result', 'winreg_mock'] | None | {"Assign": 9, "Expr": 3, "With": 1} | 15 | 46 | 15 | ["MagicMock", "monkeypatch.setitem", "patch.object", "patch.object", "CliRunner", "runner.invoke", "winreg_mock.assert_has_calls", "call.CreateKeyEx", "call.SetValueEx", "call.SetValueEx", "call.CreateKeyEx", "call.SetValueEx", "call.CloseKey", "call.CloseKey", "result.output.strip"] | 0 | [] | The function (test_cli_handle_web_url_install_current_user_monkeypatched_windows) defined within the public class called public.The function start at line 504 and ends at 549. It contains 34 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [504.0] and does not return any valu... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_handle_web_url_install_all_users_monkeypatched_windows | def test_cli_handle_web_url_install_all_users_monkeypatched_windows(fresh_deadline_config, monkeypatch):"""Tests the registry installation calls for Windows URL handler installers.By monkeypatching, we can test this on any OS.This test is pretty inflexible, it verifies that the specific set of known-good winregcalls ar... | 1 | 34 | 2 | 208 | 3 | 552 | 597 | 552 | fresh_deadline_config,monkeypatch | ['runner', 'result', 'winreg_mock'] | None | {"Assign": 9, "Expr": 3, "With": 1} | 15 | 46 | 15 | ["MagicMock", "monkeypatch.setitem", "patch.object", "patch.object", "CliRunner", "runner.invoke", "winreg_mock.assert_has_calls", "call.CreateKeyEx", "call.SetValueEx", "call.SetValueEx", "call.CreateKeyEx", "call.SetValueEx", "call.CloseKey", "call.CloseKey", "result.output.strip"] | 0 | [] | The function (test_cli_handle_web_url_install_all_users_monkeypatched_windows) defined within the public class called public.The function start at line 552 and ends at 597. It contains 34 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [552.0] and does not return any value. ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_handle_web_url_uninstall_current_user_monkeypatched_windows | def test_cli_handle_web_url_uninstall_current_user_monkeypatched_windows(fresh_deadline_config, monkeypatch):"""Tests the registry installation calls for Windows URL handler installers.By monkeypatching, we can test this on any OS.This test is pretty inflexible, it verifies that the specific set of known-good winregcal... | 1 | 25 | 2 | 180 | 3 | 600 | 636 | 600 | fresh_deadline_config,monkeypatch | ['runner', 'result', 'winreg_mock'] | None | {"Assign": 9, "Expr": 3, "With": 1} | 14 | 37 | 14 | ["MagicMock", "monkeypatch.setitem", "patch.object", "patch.object", "CliRunner", "runner.invoke", "winreg_mock.assert_has_calls", "call.OpenKeyEx", "call.DeleteKeyEx", "call.DeleteKeyEx", "call.DeleteKeyEx", "call.DeleteKeyEx", "call.CloseKey", "result.output.strip"] | 0 | [] | The function (test_cli_handle_web_url_uninstall_current_user_monkeypatched_windows) defined within the public class called public.The function start at line 600 and ends at 636. It contains 25 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [600.0] and does not return any va... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_handle_web_url_uninstall_all_users_monkeypatched_windows | def test_cli_handle_web_url_uninstall_all_users_monkeypatched_windows(fresh_deadline_config, monkeypatch):"""Tests the registry installation calls for Windows URL handler installers.By monkeypatching, we can test this on any OS.This test is pretty inflexible, it verifies that the specific set of known-good winregcalls ... | 1 | 23 | 2 | 166 | 3 | 639 | 673 | 639 | fresh_deadline_config,monkeypatch | ['runner', 'result', 'winreg_mock'] | None | {"Assign": 9, "Expr": 3, "With": 1} | 12 | 35 | 12 | ["MagicMock", "monkeypatch.setitem", "patch.object", "patch.object", "CliRunner", "runner.invoke", "winreg_mock.assert_has_calls", "call.DeleteKeyEx", "call.DeleteKeyEx", "call.DeleteKeyEx", "call.DeleteKeyEx", "result.output.strip"] | 0 | [] | The function (test_cli_handle_web_url_uninstall_all_users_monkeypatched_windows) defined within the public class called public.The function start at line 639 and ends at 673. It contains 23 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [639.0] and does not return any value... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_list | def test_cli_job_list(fresh_deadline_config):"""Confirm that the CLI interface prints out the expected list ofjobs, given mock data."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)with patch.object(api._session, "get_boto3_session") as session_mock:session_mo... | 1 | 15 | 1 | 99 | 2 | 140 | 179 | 140 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 3, "Expr": 3, "With": 1} | 8 | 40 | 8 | ["config.set_setting", "config.set_setting", "patch.object", "client", "session_mock", "len", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_cli_job_list) defined within the public class called public.The function start at line 140 and ends at 179. It contains 15 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 8.0 functions, and It has 8.0 functio... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_list_explicit_farm_and_queue_id | def test_cli_job_list_explicit_farm_and_queue_id(fresh_deadline_config):"""Confirm that the CLI interface prints out the expected list ofjobs, given mock data."""with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").search_jobs.return_value = {"jobs": MOCK_JOBS_LIST,"tot... | 1 | 16 | 1 | 92 | 2 | 182 | 221 | 182 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 3, "Expr": 1, "With": 1} | 6 | 40 | 6 | ["patch.object", "client", "session_mock", "len", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_cli_job_list_explicit_farm_and_queue_id) defined within the public class called public.The function start at line 182 and ends at 221. It contains 16 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functio... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_list_override_profile | def test_cli_job_list_override_profile(fresh_deadline_config):"""Confirms that the --profile option overrides the option to boto3.Session."""# set the farm id for the overridden profileconfig.set_setting("defaults.aws_profile_name", "NonDefaultProfileName")config.set_setting("defaults.farm_id", "farm-overriddenid")conf... | 1 | 23 | 1 | 171 | 2 | 224 | 253 | 224 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 3, "Expr": 8, "With": 1} | 15 | 30 | 15 | ["config.set_setting", "config.set_setting", "config.set_setting", "config.set_setting", "patch.object", "client", "session_mock", "len", "session_mock.reset_mock", "CliRunner", "runner.invoke", "session_mock.assert_called_once_with", "search_jobs.assert_called_once_with", "client", "session_mock"] | 0 | [] | The function (test_cli_job_list_override_profile) defined within the public class called public.The function start at line 224 and ends at 253. It contains 23 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 15.0 functions, and ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_list_no_farm_id | def test_cli_job_list_no_farm_id(fresh_deadline_config):with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").search_jobs.return_value = {"jobs": MOCK_JOBS_LIST,"totalResults": 12,"nextPage": len(MOCK_JOBS_LIST),}runner = CliRunner()result = runner.invoke(main, ["job", "... | 1 | 11 | 1 | 80 | 2 | 256 | 268 | 256 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 3, "With": 1} | 6 | 13 | 6 | ["patch.object", "client", "session_mock", "len", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_cli_job_list_no_farm_id) defined within the public class called public.The function start at line 256 and ends at 268. It contains 11 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It has ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_list_no_queue_id | def test_cli_job_list_no_queue_id(fresh_deadline_config):config.set_setting("defaults.farm_id", MOCK_FARM_ID)with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").search_jobs.return_value = {"jobs": MOCK_JOBS_LIST,"totalResults": 12,"nextPage": len(MOCK_JOBS_LIST),}runne... | 1 | 12 | 1 | 88 | 2 | 271 | 285 | 271 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 3, "Expr": 1, "With": 1} | 7 | 15 | 7 | ["config.set_setting", "patch.object", "client", "session_mock", "len", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_cli_job_list_no_queue_id) defined within the public class called public.The function start at line 271 and ends at 285. It contains 12 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 7.0 functions, and It has... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_list_client_error | def test_cli_job_list_client_error(fresh_deadline_config):config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").search_jobs.side_effect = ClientError({"Error": {"Mes... | 1 | 12 | 1 | 99 | 2 | 288 | 302 | 288 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 3, "Expr": 2, "With": 1} | 8 | 15 | 8 | ["config.set_setting", "config.set_setting", "patch.object", "client", "session_mock", "ClientError", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_cli_job_list_client_error) defined within the public class called public.The function start at line 288 and ends at 302. It contains 12 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 8.0 functions, and It ha... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_get | def test_cli_job_get(fresh_deadline_config):"""Confirm that the CLI interface prints out the expected job, given mock data."""with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").get_job.return_value = MOCK_JOBS_LIST[0]runner = CliRunner()result = runner.invoke(main,["j... | 1 | 24 | 1 | 124 | 2 | 305 | 345 | 305 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 3, "Expr": 2, "With": 1} | 9 | 41 | 9 | ["patch.object", "client", "session_mock", "CliRunner", "runner.invoke", "str", "get_job.assert_called_once_with", "client", "session_mock"] | 0 | [] | The function (test_cli_job_get) defined within the public class called public.The function start at line 305 and ends at 345. It contains 24 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 9.0 functions, and It has 9.0 function... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_download_output_stdout_with_only_required_input | def test_cli_job_download_output_stdout_with_only_required_input(fresh_deadline_config, tmp_path: Path):"""Tests whether the output messages printed to stdout match expected messageswhen `download-output` command is executed."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", ... | 3 | 75 | 2 | 370 | 7 | 348 | 454 | 348 | fresh_deadline_config,tmp_path | ['mock_download', 'mock_files_list', 'mock_host_path_format', 'runner', 'mock_root_path', 'path_separator', 'result'] | None | {"Assign": 12, "Expr": 4, "With": 1} | 21 | 107 | 21 | ["config.set_setting", "config.set_setting", "patch.object", "patch.object", "patch.object", "patch.object", "patch.object", "MagicMock", "DownloadSummaryStatistics", "str", "PathFormat.get_host_path_format", "boto3_client_mock", "boto3_client_mock", "CliRunner", "runner.invoke", "str", "MockOutputDownloader.assert_cal... | 0 | [] | The function (test_cli_job_download_output_stdout_with_only_required_input) defined within the public class called public.The function start at line 348 and ends at 454. It contains 75 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [348.0] and does not return any value. It ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_download_output_stdout_with_mismatching_path_format | def test_cli_job_download_output_stdout_with_mismatching_path_format(fresh_deadline_config, tmp_path: Path):"""Tests that the `download-output` command handles cross-platform situations,where the output files of the job submitted on Windows need to be downloadedon non-Windows and vice versa, by verifying that the outpu... | 4 | 70 | 2 | 356 | 8 | 457 | 553 | 457 | fresh_deadline_config,tmp_path | ['mock_download', 'other_format', 'mock_files_list', 'runner', 'mock_root_path', 'current_format', 'path_separator', 'result'] | None | {"Assign": 13, "Expr": 4, "With": 1} | 23 | 97 | 23 | ["config.set_setting", "config.set_setting", "patch.object", "patch.object", "patch.object", "patch.object", "patch.object", "MagicMock", "DownloadSummaryStatistics", "str", "str", "PathFormat.get_host_path_format", "boto3_client_mock", "boto3_client_mock", "CliRunner", "runner.invoke", "str", "MockOutputDownloader.ass... | 0 | [] | The function (test_cli_job_download_output_stdout_with_mismatching_path_format) defined within the public class called public.The function start at line 457 and ends at 553. It contains 70 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [457.0] and does not return any value.... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_download_output_handles_unc_path_on_windows | def test_cli_job_download_output_handles_unc_path_on_windows(fresh_deadline_config, tmp_path: Path):"""This tests only runs on Windows OS.Executes the `download-output` command on a job that has a root path of UNC format,and verifies that the output messages printed to stdout match expected messages."""config.set_setti... | 2 | 64 | 2 | 328 | 6 | 560 | 653 | 560 | fresh_deadline_config,tmp_path | ['mock_download', 'mock_files_list', 'runner', 'mock_root_path', 'path_separator', 'result'] | None | {"Assign": 11, "Expr": 4, "With": 1} | 21 | 94 | 21 | ["config.set_setting", "config.set_setting", "patch.object", "patch.object", "patch.object", "patch.object", "patch.object", "MagicMock", "DownloadSummaryStatistics", "str", "boto3_client_mock", "boto3_client_mock", "CliRunner", "runner.invoke", "str", "MockOutputDownloader.assert_called_once_with", "JobAttachmentS3Set... | 0 | [] | The function (test_cli_job_download_output_handles_unc_path_on_windows) defined within the public class called public.The function start at line 560 and ends at 653. It contains 64 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [560.0] and does not return any value. It decl... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_download_no_output_stdout | def test_cli_job_download_no_output_stdout(fresh_deadline_config, tmp_path: Path):"""Tests whether the output messages printed to stdout match expected messageswhen executing download-output command for a job that don't have any output yet."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defau... | 1 | 54 | 2 | 273 | 4 | 656 | 718 | 656 | fresh_deadline_config,tmp_path | ['mock_download', 'runner', 'result', 'mock_host_path_format_name'] | None | {"Assign": 9, "Expr": 4, "With": 1} | 17 | 63 | 17 | ["config.set_setting", "config.set_setting", "patch.object", "patch.object", "patch.object", "patch.object", "patch.object", "MagicMock", "DownloadSummaryStatistics", "PathFormat.get_host_path_format_string", "boto3_client_mock", "PathFormat", "boto3_client_mock", "CliRunner", "runner.invoke", "MockOutputDownloader.ass... | 0 | [] | The function (test_cli_job_download_no_output_stdout) defined within the public class called public.The function start at line 656 and ends at 718. It contains 54 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [656.0] and does not return any value. It declares 17.0 function... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_download_output_stdout_with_json_format | def test_cli_job_download_output_stdout_with_json_format(fresh_deadline_config,tmp_path: Path,):"""Tests whether the output messages printed to stdout match expected messageswhen `download-output` command is executed with `--output json` option."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("... | 2 | 101 | 2 | 487 | 10 | 721 | 832 | 721 | fresh_deadline_config,tmp_path | ['mock_download', 'mock_files_list', 'mock_host_path_format', 'expected_json_pathconfirm', 'expected_json_path', 'runner', 'expected_json_presummary', 'mock_root_path', 'expected_json_title', 'result'] | None | {"Assign": 15, "Expr": 4, "With": 1} | 25 | 112 | 25 | ["config.set_setting", "config.set_setting", "patch.object", "patch.object", "patch.object", "patch.object", "patch.object", "patch.object", "MagicMock", "DownloadSummaryStatistics", "str", "PathFormat.get_host_path_format", "boto3_client_mock", "boto3_client_mock", "CliRunner", "runner.invoke", "json.dumps", "str", "M... | 0 | [] | The function (test_cli_job_download_output_stdout_with_json_format) defined within the public class called public.The function start at line 721 and ends at 832. It contains 101 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [721.0] and does not return any value. It declare... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_get_summary_of_files_to_download_message_posix | def test_get_summary_of_files_to_download_message_posix(output_paths_by_root: Dict[str, List[str]],expected_result: str,):"""Tests if the _get_summary_of_files_to_download_message() returns expected string"""is_json_format = Falseassert (_get_summary_of_files_to_download_message(output_paths_by_root, is_json_format)== ... | 1 | 9 | 2 | 35 | 1 | 877 | 886 | 877 | output_paths_by_root,expected_result | ['is_json_format'] | None | {"Assign": 1, "Expr": 1} | 3 | 10 | 3 | ["_get_summary_of_files_to_download_message", "pytest.mark.skipif", "pytest.mark.parametrize"] | 0 | [] | The function (test_get_summary_of_files_to_download_message_posix) defined within the public class called public.The function start at line 877 and ends at 886. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [877.0] and does not return any value. It declares 3... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_get_summary_of_files_to_download_message_windows | def test_get_summary_of_files_to_download_message_windows(output_paths_by_root: Dict[str, List[str]],expected_result: str,):"""Tests if the _get_summary_of_files_to_download_message() returns expected string"""is_json_format = Falseassert (_get_summary_of_files_to_download_message(output_paths_by_root, is_json_format)=... | 1 | 9 | 2 | 35 | 1 | 902 | 911 | 902 | output_paths_by_root,expected_result | ['is_json_format'] | None | {"Assign": 1, "Expr": 1} | 3 | 10 | 3 | ["_get_summary_of_files_to_download_message", "pytest.mark.skipif", "pytest.mark.parametrize"] | 0 | [] | The function (test_get_summary_of_files_to_download_message_windows) defined within the public class called public.The function start at line 902 and ends at 911. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [902.0] and does not return any value. It declares... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_wait_succeeded | def test_cli_job_wait_succeeded(fresh_deadline_config):"""Test that job wait command returns exit code 0 when job succeeds."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)config.set_setting("defaults.job_id", MOCK_JOB_ID)with patch.object(api, "wait_for_job_c... | 1 | 22 | 1 | 166 | 2 | 914 | 945 | 914 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 4, "Expr": 5, "With": 1} | 11 | 32 | 11 | ["config.set_setting", "config.set_setting", "config.set_setting", "patch.object", "patch.object", "api.JobCompletionResult", "boto3_client_mock", "CliRunner", "runner.invoke", "get_job.assert_called_once_with", "boto3_client_mock"] | 0 | [] | The function (test_cli_job_wait_succeeded) defined within the public class called public.The function start at line 914 and ends at 945. It contains 22 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 11.0 functions, and It has ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_wait_timeout | def test_cli_job_wait_timeout(fresh_deadline_config):"""Test that job wait command returns exit code 1 when timeout occurs."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)config.set_setting("defaults.job_id", MOCK_JOB_ID)with patch.object(api, "wait_for_job_c... | 1 | 15 | 1 | 105 | 2 | 948 | 970 | 948 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 4, "Expr": 4, "With": 1} | 9 | 23 | 9 | ["config.set_setting", "config.set_setting", "config.set_setting", "patch.object", "patch.object", "DeadlineOperationTimedOut", "boto3_client_mock", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_cli_job_wait_timeout) defined within the public class called public.The function start at line 948 and ends at 970. It contains 15 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 9.0 functions, and It has 9.0... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_wait_failed | def test_cli_job_wait_failed(fresh_deadline_config):"""Test that job wait command returns exit code 2 when job fails."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)config.set_setting("defaults.job_id", MOCK_JOB_ID)with patch.object(api, "wait_for_job_complet... | 1 | 29 | 1 | 180 | 2 | 973 | 1,009 | 973 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 4, "Expr": 4, "With": 1} | 10 | 37 | 10 | ["config.set_setting", "config.set_setting", "config.set_setting", "patch.object", "patch.object", "api.JobCompletionResult", "api.FailedTask", "boto3_client_mock", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_cli_job_wait_failed) defined within the public class called public.The function start at line 973 and ends at 1009. It contains 29 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 10.0 functions, and It has 10... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_wait_canceled | def test_cli_job_wait_canceled(fresh_deadline_config):"""Test that job wait command returns exit code 3 when job is canceled."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)config.set_setting("defaults.job_id", MOCK_JOB_ID)with patch.object(api, "wait_for_job... | 1 | 19 | 1 | 146 | 2 | 1,012 | 1,038 | 1,012 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 4, "Expr": 4, "With": 1} | 9 | 27 | 9 | ["config.set_setting", "config.set_setting", "config.set_setting", "patch.object", "patch.object", "api.JobCompletionResult", "boto3_client_mock", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_cli_job_wait_canceled) defined within the public class called public.The function start at line 1012 and ends at 1038. It contains 19 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 9.0 functions, and It has ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_wait_archived | def test_cli_job_wait_archived(fresh_deadline_config):"""Test that job wait command returns exit code 4 when job is archived."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)config.set_setting("defaults.job_id", MOCK_JOB_ID)with patch.object(api, "wait_for_job... | 1 | 19 | 1 | 146 | 2 | 1,041 | 1,067 | 1,041 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 4, "Expr": 4, "With": 1} | 9 | 27 | 9 | ["config.set_setting", "config.set_setting", "config.set_setting", "patch.object", "patch.object", "api.JobCompletionResult", "boto3_client_mock", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_cli_job_wait_archived) defined within the public class called public.The function start at line 1041 and ends at 1067. It contains 19 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 9.0 functions, and It has ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_wait_not_compatible | def test_cli_job_wait_not_compatible(fresh_deadline_config):"""Test that job wait command returns exit code 5 when job is not compatible."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)config.set_setting("defaults.job_id", MOCK_JOB_ID)with patch.object(api, "... | 1 | 19 | 1 | 146 | 2 | 1,070 | 1,096 | 1,070 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 4, "Expr": 4, "With": 1} | 9 | 27 | 9 | ["config.set_setting", "config.set_setting", "config.set_setting", "patch.object", "patch.object", "api.JobCompletionResult", "boto3_client_mock", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_cli_job_wait_not_compatible) defined within the public class called public.The function start at line 1070 and ends at 1096. It contains 19 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 9.0 functions, and I... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_wait_succeeded_with_failed_tasks_returns_exit_code_2 | def test_cli_job_wait_succeeded_with_failed_tasks_returns_exit_code_2(fresh_deadline_config):"""Test that job wait command returns exit code 2 when there are failed tasks, even if status is SUCCEEDED."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)config.set_... | 1 | 28 | 1 | 174 | 2 | 1,099 | 1,134 | 1,099 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 4, "Expr": 4, "With": 1} | 10 | 36 | 10 | ["config.set_setting", "config.set_setting", "config.set_setting", "patch.object", "patch.object", "api.JobCompletionResult", "api.FailedTask", "boto3_client_mock", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_cli_job_wait_succeeded_with_failed_tasks_returns_exit_code_2) defined within the public class called public.The function start at line 1099 and ends at 1134. It contains 28 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_wait_json_output_succeeded | def test_cli_job_wait_json_output_succeeded(fresh_deadline_config):"""Test that job wait command with JSON output returns exit code 0 when job succeeds."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)config.set_setting("defaults.job_id", MOCK_JOB_ID)with patc... | 1 | 20 | 1 | 171 | 3 | 1,137 | 1,165 | 1,137 | fresh_deadline_config | ['runner', 'result', 'output_data'] | None | {"Assign": 5, "Expr": 4, "With": 1} | 11 | 29 | 11 | ["config.set_setting", "config.set_setting", "config.set_setting", "patch.object", "patch.object", "api.JobCompletionResult", "boto3_client_mock", "CliRunner", "runner.invoke", "json.loads", "pytest.approx"] | 0 | [] | The function (test_cli_job_wait_json_output_succeeded) defined within the public class called public.The function start at line 1137 and ends at 1165. It contains 20 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 11.0 functions... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_wait_json_output_failed | def test_cli_job_wait_json_output_failed(fresh_deadline_config):"""Test that job wait command with JSON output returns exit code 2 when job fails."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)config.set_setting("defaults.job_id", MOCK_JOB_ID)with patch.obje... | 1 | 34 | 1 | 259 | 3 | 1,168 | 1,210 | 1,168 | fresh_deadline_config | ['runner', 'result', 'output_data'] | None | {"Assign": 5, "Expr": 4, "With": 1} | 13 | 43 | 13 | ["config.set_setting", "config.set_setting", "config.set_setting", "patch.object", "patch.object", "api.JobCompletionResult", "api.FailedTask", "boto3_client_mock", "CliRunner", "runner.invoke", "json.loads", "pytest.approx", "len"] | 0 | [] | The function (test_cli_job_wait_json_output_failed) defined within the public class called public.The function start at line 1168 and ends at 1210. It contains 34 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 13.0 functions, a... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_wait_unknown_status_returns_exit_code_2 | def test_cli_job_wait_unknown_status_returns_exit_code_2(fresh_deadline_config):"""Test that job wait command returns exit code 2 for unknown status."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)config.set_setting("defaults.job_id", MOCK_JOB_ID)with patch.o... | 1 | 18 | 1 | 141 | 3 | 1,213 | 1,237 | 1,213 | fresh_deadline_config | ['runner', 'result', 'mock_client'] | None | {"Assign": 5, "Expr": 4, "With": 1} | 8 | 25 | 8 | ["config.set_setting", "config.set_setting", "config.set_setting", "patch.object", "patch.object", "api.JobCompletionResult", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_cli_job_wait_unknown_status_returns_exit_code_2) defined within the public class called public.The function start at line 1213 and ends at 1237. It contains 18 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 8... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_wait_timeout_json_output | def test_cli_job_wait_timeout_json_output(fresh_deadline_config):"""Test that job wait command handles timeout correctly with JSON output."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)config.set_setting("defaults.job_id", MOCK_JOB_ID)with patch.object(api, ... | 1 | 22 | 1 | 150 | 4 | 1,240 | 1,269 | 1,240 | fresh_deadline_config | ['runner', 'result', 'mock_client', 'output_data'] | None | {"Assign": 6, "Expr": 4, "With": 1} | 9 | 30 | 9 | ["config.set_setting", "config.set_setting", "config.set_setting", "patch.object", "patch.object", "DeadlineOperationTimedOut", "CliRunner", "runner.invoke", "json.loads"] | 0 | [] | The function (test_cli_job_wait_timeout_json_output) defined within the public class called public.The function start at line 1240 and ends at 1269. It contains 22 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 9.0 functions, a... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_wait_error_handling | def test_cli_job_wait_error_handling(fresh_deadline_config):"""Test that job wait command handles non-timeout errors correctly."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)config.set_setting("defaults.job_id", MOCK_JOB_ID)with patch.object(api, "wait_for_j... | 1 | 16 | 1 | 126 | 3 | 1,272 | 1,294 | 1,272 | fresh_deadline_config | ['runner', 'result', 'mock_client'] | None | {"Assign": 5, "Expr": 4, "With": 1} | 8 | 23 | 8 | ["config.set_setting", "config.set_setting", "config.set_setting", "patch.object", "patch.object", "DeadlineOperationError", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_cli_job_wait_error_handling) defined within the public class called public.The function start at line 1272 and ends at 1294. It contains 16 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 8.0 functions, and I... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_wait_error_handling_json_output | def test_cli_job_wait_error_handling_json_output(fresh_deadline_config):"""Test that job wait command handles non-timeout errors correctly with JSON output."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)config.set_setting("defaults.job_id", MOCK_JOB_ID)with ... | 1 | 17 | 1 | 141 | 4 | 1,297 | 1,321 | 1,297 | fresh_deadline_config | ['runner', 'result', 'mock_client', 'output_data'] | None | {"Assign": 6, "Expr": 4, "With": 1} | 9 | 25 | 9 | ["config.set_setting", "config.set_setting", "config.set_setting", "patch.object", "patch.object", "DeadlineOperationError", "CliRunner", "runner.invoke", "json.loads"] | 0 | [] | The function (test_cli_job_wait_error_handling_json_output) defined within the public class called public.The function start at line 1297 and ends at 1321. It contains 17 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 9.0 funct... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_download_output_handle_web_url_with_optional_input | def test_cli_job_download_output_handle_web_url_with_optional_input(fresh_deadline_config):"""Confirm that the CLI interface prints out the expected list offarms, given mock data."""config.set_setting("settings.auto_accept", "true")with patch.object(api, "get_boto3_client") as boto3_client_mock, patch.object(job_group,... | 1 | 60 | 1 | 254 | 4 | 1,324 | 1,391 | 1,324 | fresh_deadline_config | ['mock_download', 'runner', 'result', 'mock_host_path_format_name'] | None | {"Assign": 8, "Expr": 4, "With": 1} | 16 | 68 | 16 | ["config.set_setting", "patch.object", "patch.object", "patch.object", "patch.object", "MagicMock", "DownloadSummaryStatistics", "PathFormat.get_host_path_format_string", "boto3_client_mock", "PathFormat", "boto3_client_mock", "CliRunner", "runner.invoke", "MockOutputDownloader.assert_called_once_with", "JobAttachmentS... | 0 | [] | The function (test_cli_job_download_output_handle_web_url_with_optional_input) defined within the public class called public.The function start at line 1324 and ends at 1391. It contains 60 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_trace_schedule | def test_cli_job_trace_schedule(fresh_deadline_config):"""A very minimal sanity check of the trace-schedule CLI command.To test the function more thoroughly involves creating a mockset of APIs that return a coherent set of data based on the queryIDs instead of single mocked returns as this test does."""with patch.objec... | 1 | 28 | 1 | 132 | 3 | 1,394 | 1,454 | 1,394 | fresh_deadline_config | ['runner', 'result', 'deadline_mock'] | None | {"Assign": 8, "Expr": 1, "With": 1} | 6 | 61 | 6 | ["patch.object", "client", "session_mock", "CliRunner", "runner.invoke", "str"] | 0 | [] | The function (test_cli_job_trace_schedule) defined within the public class called public.The function start at line 1394 and ends at 1454. It contains 28 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It has... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_download_output_with_different_asset_root_path_format_than_job | def test_cli_job_download_output_with_different_asset_root_path_format_than_job(tmp_path: Path):"""Tests whether the output messages printed to stdout match expected messageswhen `download-output` command is executed."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUE... | 4 | 69 | 1 | 394 | 9 | 1,458 | 1,549 | 1,458 | tmp_path | ['mock_download', 'not_windows_root_path', 'mock_files_list', 'mock_host_path_format', 'runner', 'mock_root_path', 'windows_root_path', 'path_separator', 'result'] | None | {"Assign": 14, "Expr": 5, "With": 1} | 21 | 92 | 21 | ["config.set_setting", "config.set_setting", "patch.object", "patch.object", "patch.object", "patch.object", "patch.object", "patch.object", "patch.object", "patch.object", "MagicMock", "MagicMock", "DownloadSummaryStatistics", "boto3_client_mock", "boto3_client_mock", "CliRunner", "runner.invoke", "MockOutputDownloade... | 0 | [] | The function (test_cli_job_download_output_with_different_asset_root_path_format_than_job) defined within the public class called public.The function start at line 1458 and ends at 1549. It contains 69 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return a... |
aws-deadline_deadline-cloud | TestJsonLineHelpers | public | 0 | 0 | test_get_json_line_basic | def test_get_json_line_basic(self):"""Test _get_json_line with basic parameters."""result = _get_json_line("test", "value")parsed = json.loads(result)assert parsed["messageType"] == "test"assert parsed["value"] == "value"assert len(parsed) == 2# Only messageType and value | 1 | 6 | 1 | 43 | 0 | 1,555 | 1,562 | 1,555 | self | [] | None | {"Assign": 2, "Expr": 1} | 3 | 8 | 3 | ["_get_json_line", "json.loads", "len"] | 0 | [] | The function (test_get_json_line_basic) defined within the public class called TestJsonLineHelpers.The function start at line 1555 and ends at 1562. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, an... |
aws-deadline_deadline-cloud | TestJsonLineHelpers | public | 0 | 0 | test_get_json_line_with_none_extra_properties | def test_get_json_line_with_none_extra_properties(self):"""Test _get_json_line with explicit None extra_properties."""result = _get_json_line("test", "value", extra_properties=None)parsed = json.loads(result)assert parsed["messageType"] == "test"assert parsed["value"] == "value"assert len(parsed) == 2# Only messageType... | 1 | 6 | 1 | 47 | 0 | 1,564 | 1,571 | 1,564 | self | [] | None | {"Assign": 2, "Expr": 1} | 3 | 8 | 3 | ["_get_json_line", "json.loads", "len"] | 0 | [] | The function (test_get_json_line_with_none_extra_properties) defined within the public class called TestJsonLineHelpers.The function start at line 1564 and ends at 1571. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It decla... |
aws-deadline_deadline-cloud | TestJsonLineHelpers | public | 0 | 0 | test_get_json_line_with_kwargs | def test_get_json_line_with_kwargs(self):"""Test _get_json_line with additional properties."""result = _get_json_line("summary", "Downloaded 5 files", extra_properties={"fileCount": 5, "status": "complete"})parsed = json.loads(result)assert parsed["messageType"] == "summary"assert parsed["value"] == "Downloaded 5 files... | 1 | 9 | 1 | 62 | 0 | 1,573 | 1,583 | 1,573 | self | [] | None | {"Assign": 2, "Expr": 1} | 2 | 11 | 2 | ["_get_json_line", "json.loads"] | 0 | [] | The function (test_get_json_line_with_kwargs) defined within the public class called TestJsonLineHelpers.The function start at line 1573 and ends at 1583. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functio... |
aws-deadline_deadline-cloud | TestJsonLineHelpers | public | 0 | 0 | test_get_json_line_with_list_value | def test_get_json_line_with_list_value(self):"""Test _get_json_line with list value and extra properties."""result = _get_json_line("path", ["/path1", "/path2"], extra_properties={"count": 2})parsed = json.loads(result)assert parsed["messageType"] == "path"assert parsed["value"] == ["/path1", "/path2"]assert parsed["co... | 1 | 6 | 1 | 59 | 0 | 1,585 | 1,592 | 1,585 | self | [] | None | {"Assign": 2, "Expr": 1} | 2 | 8 | 2 | ["_get_json_line", "json.loads"] | 0 | [] | The function (test_get_json_line_with_list_value) defined within the public class called TestJsonLineHelpers.The function start at line 1585 and ends at 1592. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 fun... |
aws-deadline_deadline-cloud | TestJsonLineHelpers | public | 0 | 0 | test_get_download_summary_message_json_with_file_count | def test_get_download_summary_message_json_with_file_count(self):"""Test _get_download_summary_message includes fileCount in JSON format."""from deadline.job_attachments.progress_tracker import DownloadSummaryStatistics# Create mock download summarysummary = DownloadSummaryStatistics()summary.processed_files = 3summary... | 1 | 13 | 1 | 91 | 0 | 1,594 | 1,611 | 1,594 | self | [] | None | {"Assign": 8, "Expr": 1} | 3 | 18 | 3 | ["DownloadSummaryStatistics", "_get_download_summary_message", "json.loads"] | 0 | [] | The function (test_get_download_summary_message_json_with_file_count) defined within the public class called TestJsonLineHelpers.The function start at line 1594 and ends at 1611. It contains 13 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value... |
aws-deadline_deadline-cloud | TestJsonLineHelpers | public | 0 | 0 | test_get_download_summary_message_json_zero_files | def test_get_download_summary_message_json_zero_files(self):"""Test _get_download_summary_message with zero files."""from deadline.job_attachments.progress_tracker import DownloadSummaryStatisticssummary = DownloadSummaryStatistics()summary.processed_files = 0result = _get_download_summary_message(summary, is_json_form... | 1 | 9 | 1 | 63 | 0 | 1,613 | 1,625 | 1,613 | self | [] | None | {"Assign": 4, "Expr": 1} | 3 | 13 | 3 | ["DownloadSummaryStatistics", "_get_download_summary_message", "json.loads"] | 0 | [] | The function (test_get_download_summary_message_json_zero_files) defined within the public class called TestJsonLineHelpers.The function start at line 1613 and ends at 1625. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It d... |
aws-deadline_deadline-cloud | TestJsonLineHelpers | public | 0 | 0 | test_get_download_summary_message_non_json_unchanged | def test_get_download_summary_message_non_json_unchanged(self):"""Test _get_download_summary_message non-JSON format is unchanged."""from deadline.job_attachments.progress_tracker import DownloadSummaryStatisticssummary = DownloadSummaryStatistics()summary.processed_files = 2summary.processed_bytes = 512summary.total_t... | 1 | 12 | 1 | 78 | 0 | 1,627 | 1,643 | 1,627 | self | [] | None | {"Assign": 7, "Expr": 1} | 3 | 17 | 3 | ["DownloadSummaryStatistics", "_get_download_summary_message", "result.startswith"] | 0 | [] | The function (test_get_download_summary_message_non_json_unchanged) defined within the public class called TestJsonLineHelpers.The function start at line 1627 and ends at 1643. It contains 12 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | add_mocks_for_job_cancel | def add_mocks_for_job_cancel(deadline_mock):"""Adds mock return values to the deadline_mock for sharing acrossthe different 'deadline job cancel' tests."""# These mock returns only contain the properties that job cancel needsdeadline_mock.get_job.return_value = {"jobId": MOCK_JOB_ID,"name": "Test Job Name","taskRunStat... | 1 | 18 | 1 | 75 | 0 | 21 | 43 | 21 | deadline_mock | [] | None | {"Assign": 2, "Expr": 1} | 0 | 23 | 0 | [] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_job_cancel_py.test_cli_job_cancel_default", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.de... | The function (add_mocks_for_job_cancel) defined within the public class called public.The function start at line 21 and ends at 43. It contains 18 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 4.0 functions calling this function wh... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_cancel_default | def test_cli_job_cancel_default(fresh_deadline_config, deadline_mock):"""Tests that 'deadline job cancel' cancels a job with default CANCELED mark-as status."""add_mocks_for_job_cancel(deadline_mock)with patch.object(click, "confirm") as mock_confirm:mock_confirm.return_value = Truerunner = CliRunner()result = runner.i... | 1 | 30 | 2 | 129 | 3 | 46 | 100 | 46 | fresh_deadline_config,deadline_mock | ['expected_output', 'runner', 'result'] | None | {"Assign": 4, "Expr": 5, "With": 1} | 7 | 55 | 7 | ["add_mocks_for_job_cancel", "patch.object", "CliRunner", "runner.invoke", "mock_confirm.assert_called_once_with", "deadline_mock.get_job.assert_called_once_with", "deadline_mock.update_job.assert_called_once_with"] | 0 | [] | The function (test_cli_job_cancel_default) defined within the public class called public.The function start at line 46 and ends at 100. It contains 30 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [46.0] and does not return any value. It declares 7.0 functions, and It has... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_cancel_user_declines | def test_cli_job_cancel_user_declines(fresh_deadline_config, deadline_mock):"""Tests that 'deadline job cancel' exits with code 1 and displays appropriate message when user declines."""add_mocks_for_job_cancel(deadline_mock)with patch.object(click, "confirm") as mock_confirm:mock_confirm.return_value = Falserunner = Cl... | 1 | 25 | 2 | 113 | 3 | 103 | 152 | 103 | fresh_deadline_config,deadline_mock | ['expected_output', 'runner', 'result'] | None | {"Assign": 4, "Expr": 5, "With": 1} | 7 | 50 | 7 | ["add_mocks_for_job_cancel", "patch.object", "CliRunner", "runner.invoke", "mock_confirm.assert_called_once_with", "deadline_mock.get_job.assert_called_once_with", "deadline_mock.update_job.assert_not_called"] | 0 | [] | The function (test_cli_job_cancel_user_declines) defined within the public class called public.The function start at line 103 and ends at 152. It contains 25 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [103.0] and does not return any value. It declares 7.0 functions, and... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_cancel_with_yes_flag | def test_cli_job_cancel_with_yes_flag(fresh_deadline_config, deadline_mock):"""Tests that 'deadline job cancel' with --yes flag skips confirmation prompt and cancels successfully."""add_mocks_for_job_cancel(deadline_mock)with patch.object(click, "confirm") as mock_confirm:runner = CliRunner()result = runner.invoke(main... | 1 | 30 | 2 | 121 | 3 | 155 | 209 | 155 | fresh_deadline_config,deadline_mock | ['expected_output', 'runner', 'result'] | None | {"Assign": 3, "Expr": 5, "With": 1} | 7 | 55 | 7 | ["add_mocks_for_job_cancel", "patch.object", "CliRunner", "runner.invoke", "mock_confirm.assert_not_called", "deadline_mock.get_job.assert_called_once_with", "deadline_mock.update_job.assert_called_once_with"] | 0 | [] | The function (test_cli_job_cancel_with_yes_flag) defined within the public class called public.The function start at line 155 and ends at 209. It contains 30 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [155.0] and does not return any value. It declares 7.0 functions, and... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_cancel_mark_as_status | def test_cli_job_cancel_mark_as_status(mark_as, fresh_deadline_config, deadline_mock):"""Tests that 'deadline job cancel' with different --mark-as status options works correctly."""add_mocks_for_job_cancel(deadline_mock)with patch.object(click, "confirm") as mock_confirm:mock_confirm.return_value = Truerunner = CliRunn... | 2 | 38 | 3 | 164 | 6 | 213 | 277 | 213 | mark_as,fresh_deadline_config,deadline_mock | ['job_summary', 'runner', 'status_message', 'expected_output', 'confirmation_message', 'result'] | None | {"Assign": 9, "Expr": 5, "If": 1, "With": 1} | 8 | 65 | 8 | ["add_mocks_for_job_cancel", "patch.object", "CliRunner", "runner.invoke", "mock_confirm.assert_called_once_with", "deadline_mock.get_job.assert_called_once_with", "deadline_mock.update_job.assert_called_once_with", "pytest.mark.parametrize"] | 0 | [] | The function (test_cli_job_cancel_mark_as_status) defined within the public class called public.The function start at line 213 and ends at 277. It contains 38 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [213.0] and does not return any value. It declares 8.0 functions, an... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_logs_verbose | def test_cli_job_logs_verbose(fresh_deadline_config):"""Test that logs CLI works correctly in verbose mode."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)config.set_setting("defaults.job_id", MOCK_JOB_ID)with patch("deadline.client.api.get_session_logs") as ... | 1 | 28 | 1 | 196 | 2 | 65 | 102 | 65 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 6, "Expr": 5, "With": 1} | 10 | 38 | 10 | ["config.set_setting", "config.set_setting", "config.set_setting", "patch", "patch", "patch", "boto3_client_mock", "CliRunner", "runner.invoke", "mock_get_logs.assert_called_once"] | 0 | [] | The function (test_cli_job_logs_verbose) defined within the public class called public.The function start at line 65 and ends at 102. It contains 28 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 10.0 functions, and It has 10.... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_logs_json | def test_cli_job_logs_json(fresh_deadline_config):"""Test that logs CLI works correctly in JSON mode."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)config.set_setting("defaults.job_id", MOCK_JOB_ID)with patch("deadline.client.api.get_session_logs") as mock_g... | 1 | 41 | 1 | 270 | 3 | 105 | 159 | 105 | fresh_deadline_config | ['runner', 'result', 'output_json'] | None | {"Assign": 6, "Expr": 4, "With": 1} | 11 | 55 | 11 | ["config.set_setting", "config.set_setting", "config.set_setting", "patch", "patch", "patch", "boto3_client_mock", "CliRunner", "runner.invoke", "json.loads", "len"] | 0 | [] | The function (test_cli_job_logs_json) defined within the public class called public.The function start at line 105 and ends at 159. It contains 41 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 11.0 functions, and It has 11.0 ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_logs_empty | def test_cli_job_logs_empty(fresh_deadline_config):"""Test that logs CLI handles empty results correctly."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)config.set_setting("defaults.job_id", MOCK_JOB_ID)with patch("deadline.client.api.get_session_logs") as mo... | 1 | 16 | 1 | 118 | 2 | 162 | 185 | 162 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 5, "Expr": 4, "With": 1} | 9 | 24 | 9 | ["config.set_setting", "config.set_setting", "config.set_setting", "patch", "patch", "patch", "boto3_client_mock", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_cli_job_logs_empty) defined within the public class called public.The function start at line 162 and ends at 185. It contains 16 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 9.0 functions, and It has 9.0 f... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_logs_json_empty | def test_cli_job_logs_json_empty(fresh_deadline_config):"""Test that logs CLI handles empty results correctly in JSON mode."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)config.set_setting("defaults.job_id", MOCK_JOB_ID)with patch("deadline.client.api.get_se... | 1 | 32 | 1 | 170 | 3 | 188 | 231 | 188 | fresh_deadline_config | ['runner', 'result', 'output_json'] | None | {"Assign": 6, "Expr": 4, "With": 1} | 11 | 44 | 11 | ["config.set_setting", "config.set_setting", "config.set_setting", "patch", "patch", "patch", "boto3_client_mock", "CliRunner", "runner.invoke", "json.loads", "len"] | 0 | [] | The function (test_cli_job_logs_json_empty) defined within the public class called public.The function start at line 188 and ends at 231. It contains 32 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 11.0 functions, and It has... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_logs_json_error | def test_cli_job_logs_json_error(fresh_deadline_config):"""Test that logs CLI handles errors correctly in JSON mode."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)with patch("deadline.client.api.get_session_logs") as mock_get_logs, patch("deadline.client.api... | 1 | 16 | 1 | 108 | 2 | 234 | 261 | 234 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 5, "Expr": 3, "With": 1} | 9 | 28 | 9 | ["config.set_setting", "config.set_setting", "patch", "patch", "patch", "Exception", "MagicMock", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_cli_job_logs_json_error) defined within the public class called public.The function start at line 234 and ends at 261. It contains 16 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 9.0 functions, and It has ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_logs_with_time_params | def test_cli_job_logs_with_time_params(fresh_deadline_config):"""Test that logs CLI handles time parameters correctly."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)config.set_setting("defaults.job_id", MOCK_JOB_ID)with patch("deadline.client.api.get_session... | 1 | 29 | 1 | 144 | 2 | 264 | 302 | 264 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 6, "Expr": 5, "With": 1} | 10 | 39 | 10 | ["config.set_setting", "config.set_setting", "config.set_setting", "patch", "patch", "patch", "boto3_client_mock", "CliRunner", "runner.invoke", "mock_get_logs.assert_called_once"] | 0 | [] | The function (test_cli_job_logs_with_time_params) defined within the public class called public.The function start at line 264 and ends at 302. It contains 29 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 10.0 functions, and ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_logs_with_next_token | def test_cli_job_logs_with_next_token(fresh_deadline_config):"""Test that logs CLI handles next_token parameter correctly."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)config.set_setting("defaults.job_id", MOCK_JOB_ID)with patch("deadline.client.api.get_ses... | 1 | 26 | 1 | 133 | 2 | 305 | 340 | 305 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 6, "Expr": 5, "With": 1} | 10 | 36 | 10 | ["config.set_setting", "config.set_setting", "config.set_setting", "patch", "patch", "patch", "boto3_client_mock", "CliRunner", "runner.invoke", "mock_get_logs.assert_called_once"] | 0 | [] | The function (test_cli_job_logs_with_next_token) defined within the public class called public.The function start at line 305 and ends at 340. It contains 26 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 10.0 functions, and I... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_logs_with_session_id | def test_cli_job_logs_with_session_id(fresh_deadline_config):"""Test job logs command with explicit session ID."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)config.set_setting("defaults.job_id", MOCK_JOB_ID)with patch.object(api, "get_session_logs") as mock... | 1 | 65 | 1 | 345 | 2 | 343 | 419 | 343 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 4, "Expr": 5, "With": 1} | 16 | 77 | 16 | ["config.set_setting", "config.set_setting", "config.set_setting", "patch.object", "patch.object", "SessionLogResult", "LogEvent", "datetime.datetime", "datetime.datetime", "LogEvent", "datetime.datetime", "datetime.datetime", "boto3_client_mock", "CliRunner", "runner.invoke", "mock_get_logs.assert_called_once_with"] | 0 | [] | The function (test_cli_job_logs_with_session_id) defined within the public class called public.The function start at line 343 and ends at 419. It contains 65 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 16.0 functions, and I... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_logs_with_job_id_single_session | def test_cli_job_logs_with_job_id_single_session(fresh_deadline_config):"""Test job logs command with job ID when there's only one session."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)config.set_setting("defaults.job_id", MOCK_JOB_ID)with patch.object(api,... | 1 | 57 | 1 | 324 | 3 | 422 | 498 | 422 | fresh_deadline_config | ['runner', 'result', 'paginator_mock'] | None | {"Assign": 7, "Expr": 8, "With": 1} | 20 | 77 | 20 | ["config.set_setting", "config.set_setting", "config.set_setting", "patch.object", "patch.object", "MagicMock", "boto3_client_mock", "boto3_client_mock", "api.SessionLogResult", "api.LogEvent", "datetime.datetime", "datetime.datetime", "CliRunner", "runner.invoke", "get_paginator.assert_called_once_with", "boto3_client... | 0 | [] | The function (test_cli_job_logs_with_job_id_single_session) defined within the public class called public.The function start at line 422 and ends at 498. It contains 57 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 20.0 functi... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_logs_with_job_id_no_sessions | def test_cli_job_logs_with_job_id_no_sessions(fresh_deadline_config):"""Test job logs command with job ID when there are no sessions."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)with patch.object(api, "get_boto3_client") as boto3_client_mock:# Mock the pag... | 1 | 23 | 1 | 128 | 3 | 501 | 535 | 501 | fresh_deadline_config | ['runner', 'result', 'paginator_mock'] | None | {"Assign": 5, "Expr": 5, "With": 1} | 10 | 35 | 10 | ["config.set_setting", "config.set_setting", "patch.object", "MagicMock", "boto3_client_mock", "CliRunner", "runner.invoke", "get_paginator.assert_called_once_with", "boto3_client_mock", "paginator_mock.paginate.assert_called_once_with"] | 0 | [] | The function (test_cli_job_logs_with_job_id_no_sessions) defined within the public class called public.The function start at line 501 and ends at 535. It contains 23 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 10.0 functions... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_logs_with_pagination | def test_cli_job_logs_with_pagination(fresh_deadline_config):"""Test job logs command with pagination of sessions."""config.set_setting("defaults.farm_id", MOCK_FARM_ID)config.set_setting("defaults.queue_id", MOCK_QUEUE_ID)with patch.object(api, "get_boto3_client") as boto3_client_mock, patch.object(api, "get_session_l... | 1 | 67 | 1 | 322 | 3 | 538 | 620 | 538 | fresh_deadline_config | ['runner', 'result', 'paginator_mock'] | None | {"Assign": 6, "Expr": 6, "With": 1} | 18 | 83 | 18 | ["config.set_setting", "config.set_setting", "patch.object", "patch.object", "MagicMock", "boto3_client_mock", "datetime.datetime", "datetime.datetime", "api.SessionLogResult", "api.LogEvent", "datetime.datetime", "datetime.datetime", "CliRunner", "runner.invoke", "get_paginator.assert_called_once_with", "boto3_client_... | 0 | [] | The function (test_cli_job_logs_with_pagination) defined within the public class called public.The function start at line 538 and ends at 620. It contains 67 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 18.0 functions, and I... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_logs_with_job_id_prioritizes_ongoing_sessions | def test_cli_job_logs_with_job_id_prioritizes_ongoing_sessions(fresh_deadline_config):"""Test that ongoing sessions (no endedAt) are prioritized over completed sessions."""with patch.object(config, "get_setting") as mock_get_setting:mock_get_setting.side_effect = [MOCK_FARM_ID,# _apply_cli_options_to_config check for f... | 1 | 82 | 1 | 383 | 3 | 623 | 718 | 623 | fresh_deadline_config | ['runner', 'result', 'paginator_mock'] | None | {"Assign": 7, "Expr": 2, "With": 3} | 18 | 96 | 18 | ["patch.object", "patch", "patch", "MagicMock", "boto3_client_mock", "datetime.datetime", "datetime.datetime", "datetime.datetime", "datetime.datetime", "datetime.datetime", "datetime.datetime", "api.SessionLogResult", "api.LogEvent", "datetime.datetime", "datetime.datetime", "CliRunner", "runner.invoke", "mock_get_log... | 0 | [] | The function (test_cli_job_logs_with_job_id_prioritizes_ongoing_sessions) defined within the public class called public.The function start at line 623 and ends at 718. It contains 82 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declar... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.