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_job_logs_with_job_id_selects_most_recent_completed_when_no_ongoing | def test_cli_job_logs_with_job_id_selects_most_recent_completed_when_no_ongoing(fresh_deadline_config,):"""Test that when there are no ongoing sessions, the most recently completed session is selected."""with patch.object(config, "get_setting") as mock_get_setting:mock_get_setting.side_effect = [MOCK_FARM_ID,# _apply_c... | 1 | 72 | 1 | 332 | 3 | 721 | 804 | 721 | fresh_deadline_config | ['runner', 'result', 'paginator_mock'] | None | {"Assign": 7, "Expr": 2, "With": 3} | 16 | 84 | 16 | ["patch.object", "patch", "patch", "MagicMock", "boto3_client_mock", "datetime.datetime", "datetime.datetime", "datetime.datetime", "datetime.datetime", "api.SessionLogResult", "api.LogEvent", "datetime.datetime", "datetime.datetime", "CliRunner", "runner.invoke", "mock_get_logs.assert_called_once_with"] | 0 | [] | The function (test_cli_job_logs_with_job_id_selects_most_recent_completed_when_no_ongoing) defined within the public class called public.The function start at line 721 and ends at 804. It contains 72 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_logs_with_job_id_selects_most_recent_among_multiple_ongoing | def test_cli_job_logs_with_job_id_selects_most_recent_among_multiple_ongoing(fresh_deadline_config):"""Test that when there are multiple ongoing sessions, the most recently started one is selected."""with patch.object(config, "get_setting") as mock_get_setting:mock_get_setting.side_effect = [MOCK_FARM_ID,# _apply_cli_o... | 1 | 80 | 1 | 366 | 3 | 807 | 905 | 807 | fresh_deadline_config | ['runner', 'result', 'paginator_mock'] | None | {"Assign": 8, "Expr": 3, "With": 3} | 18 | 99 | 18 | ["patch.object", "patch", "patch", "MagicMock", "boto3_client_mock", "datetime.datetime", "datetime.datetime", "datetime.datetime", "boto3_client_mock", "api.SessionLogResult", "api.LogEvent", "datetime.datetime", "datetime.datetime", "CliRunner", "runner.invoke", "get_job.assert_called_once_with", "boto3_client_mock",... | 0 | [] | The function (test_cli_job_logs_with_job_id_selects_most_recent_among_multiple_ongoing) defined within the public class called public.The function start at line 807 and ends at 905. It contains 80 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any va... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_logs_json_with_job_info | def test_cli_job_logs_json_with_job_info(fresh_deadline_config):"""Test that logs CLI includes job information in JSON mode when job-id is provided."""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.ob... | 1 | 38 | 1 | 246 | 4 | 908 | 964 | 908 | fresh_deadline_config | ['runner', 'result', 'output_json', 'paginator_mock'] | None | {"Assign": 8, "Expr": 4, "With": 1} | 12 | 57 | 12 | ["config.set_setting", "config.set_setting", "config.set_setting", "patch.object", "patch.object", "MagicMock", "boto3_client_mock", "boto3_client_mock", "CliRunner", "runner.invoke", "json.loads", "len"] | 0 | [] | The function (test_cli_job_logs_json_with_job_info) defined within the public class called public.The function start at line 908 and ends at 964. It contains 38 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... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_logs_timezone_utc | def test_cli_job_logs_timezone_utc(fresh_deadline_config):"""Test that logs CLI works correctly with UTC timezone (default)."""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_s... | 1 | 17 | 1 | 124 | 2 | 967 | 992 | 967 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 5, "Expr": 4, "With": 1} | 9 | 26 | 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_timezone_utc) defined within the public class called public.The function start at line 967 and ends at 992. 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 functions, and It ha... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_logs_timezone_local_verbose | def test_cli_job_logs_timezone_local_verbose(fresh_deadline_config):"""Test that logs CLI works correctly with local timezone 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)# Create timezone-a... | 2 | 47 | 1 | 320 | 6 | 995 | 1,057 | 995 | fresh_deadline_config | ['timezone_aware_events', 'runner', 'utc_time1', 'result', 'timezone_aware_result', 'utc_time2'] | None | {"Assign": 9, "Expr": 4, "With": 1} | 16 | 63 | 16 | ["config.set_setting", "config.set_setting", "config.set_setting", "datetime.datetime", "datetime.datetime", "LogEvent", "datetime.datetime", "LogEvent", "datetime.datetime", "SessionLogResult", "patch", "patch", "patch", "boto3_client_mock", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_cli_job_logs_timezone_local_verbose) defined within the public class called public.The function start at line 995 and ends at 1057. It contains 47 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 16.0 functions... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_logs_timezone_local_json | def test_cli_job_logs_timezone_local_json(fresh_deadline_config):"""Test that logs CLI works correctly with local timezone 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)# Create timezone-aware d... | 9 | 66 | 1 | 450 | 11 | 1,060 | 1,144 | 1,060 | fresh_deadline_config | ['timestamp1', 'timestamp2', 'ingestion2', 'timezone_aware_events', 'runner', 'output_json', 'utc_time1', 'result', 'ingestion1', 'timezone_aware_result', 'utc_time2'] | None | {"Assign": 14, "Expr": 4, "With": 1} | 18 | 85 | 18 | ["config.set_setting", "config.set_setting", "config.set_setting", "datetime.datetime", "datetime.datetime", "LogEvent", "datetime.datetime", "LogEvent", "datetime.datetime", "SessionLogResult", "patch", "patch", "patch", "boto3_client_mock", "CliRunner", "runner.invoke", "json.loads", "len"] | 0 | [] | The function (test_cli_job_logs_timezone_local_json) defined within the public class called public.The function start at line 1060 and ends at 1144. It contains 66 lines of code and it has a cyclomatic complexity of 9. The function does not take any parameters and does not return any value. It declares 18.0 functions, ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | add_mocks_for_job_requeue_tasks | def add_mocks_for_job_requeue_tasks(deadline_mock):"""Adds mock return values to the deadline_mock for sharing acrossthe different 'deadline job requeue-tasks' tests."""# These mock returns only contain the properties that requeue-tasks needsdeadline_mock.get_job.return_value = {"jobId": MOCK_JOB_ID,"name": "Mock Job",... | 1 | 66 | 1 | 274 | 0 | 25 | 95 | 25 | deadline_mock | [] | None | {"Assign": 4, "Expr": 1} | 0 | 71 | 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_requeue_tasks_py.test_cli_job_requeue_tasks", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.u... | The function (add_mocks_for_job_requeue_tasks) defined within the public class called public.The function start at line 25 and ends at 95. It contains 66 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 func... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_requeue_tasks | def test_cli_job_requeue_tasks(fresh_deadline_config, deadline_mock):"""Tests that 'deadline job requeue-tasks' requeues all the tasks of the correct run status."""add_mocks_for_job_requeue_tasks(deadline_mock)with patch.object(click, "confirm") as mock_confirm:mock_confirm.return_value = Truerunner = CliRunner()result... | 1 | 50 | 2 | 177 | 2 | 98 | 173 | 98 | fresh_deadline_config,deadline_mock | ['runner', 'result'] | None | {"Assign": 3, "Expr": 3, "With": 1} | 8 | 76 | 8 | ["add_mocks_for_job_requeue_tasks", "patch.object", "CliRunner", "runner.invoke", "mock_confirm.assert_called_once_with", "call", "call", "call"] | 0 | [] | The function (test_cli_job_requeue_tasks) defined within the public class called public.The function start at line 98 and ends at 173. It contains 50 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [98.0] and does not return any value. It declares 8.0 functions, and It has ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_requeue_tasks_user_says_no | def test_cli_job_requeue_tasks_user_says_no(fresh_deadline_config, deadline_mock):"""Tests that 'deadline job requeue-tasks' requeues nothing if the user says "no" to the confirmation prompt."""add_mocks_for_job_requeue_tasks(deadline_mock)with patch.object(click, "confirm") as mock_confirm:mock_confirm.return_value = ... | 1 | 25 | 2 | 90 | 2 | 176 | 218 | 176 | fresh_deadline_config,deadline_mock | ['runner', 'result'] | None | {"Assign": 3, "Expr": 3, "With": 1} | 5 | 43 | 5 | ["add_mocks_for_job_requeue_tasks", "patch.object", "CliRunner", "runner.invoke", "mock_confirm.assert_called_once_with"] | 0 | [] | The function (test_cli_job_requeue_tasks_user_says_no) defined within the public class called public.The function start at line 176 and ends at 218. It contains 25 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [176.0] and does not return any value. It declares 5.0 function... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_requeue_tasks_of_each_status | def test_cli_job_requeue_tasks_of_each_status(run_status, task_id, fresh_deadline_config, deadline_mock):"""Tests that 'deadline job requeue-tasks' requeues the one task of each selected run status."""add_mocks_for_job_requeue_tasks(deadline_mock)runner = CliRunner()result = runner.invoke(main,["job","requeue-tasks","-... | 1 | 34 | 4 | 101 | 2 | 231 | 287 | 231 | run_status,task_id,fresh_deadline_config,deadline_mock | ['runner', 'result'] | None | {"Assign": 2, "Expr": 2} | 5 | 57 | 5 | ["add_mocks_for_job_requeue_tasks", "CliRunner", "runner.invoke", "call", "pytest.mark.parametrize"] | 0 | [] | The function (test_cli_job_requeue_tasks_of_each_status) defined within the public class called public.The function start at line 231 and ends at 287. It contains 34 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [231.0] and does not return any value. It declares 5.0 functi... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_job_requeue_tasks_multiple_statuses | def test_cli_job_requeue_tasks_multiple_statuses(fresh_deadline_config, deadline_mock):"""Tests that 'deadline job requeue-tasks' requeues all statuses provided with repeated--run-status options."""add_mocks_for_job_requeue_tasks(deadline_mock)runner = CliRunner()result = runner.invoke(main,["job","requeue-tasks","--fa... | 1 | 42 | 2 | 131 | 2 | 290 | 356 | 290 | fresh_deadline_config,deadline_mock | ['runner', 'result'] | None | {"Assign": 2, "Expr": 2} | 5 | 67 | 5 | ["add_mocks_for_job_requeue_tasks", "CliRunner", "runner.invoke", "call", "call"] | 0 | [] | The function (test_cli_job_requeue_tasks_multiple_statuses) defined within the public class called public.The function start at line 290 and ends at 356. It contains 42 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [290.0] and does not return any value. It declares 5.0 fun... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | mock_cachedb | def mock_cachedb():mock_hash_cache = MagicMock(spec=HashCache)mock_hash_cache.__enter__.return_value = mock_hash_cachemock_hash_cache.__exit__.return_value = Nonereturn mock_hash_cache | 1 | 5 | 0 | 28 | 1 | 24 | 28 | 24 | ['mock_hash_cache'] | Returns | {"Assign": 3, "Return": 1} | 1 | 5 | 1 | ["MagicMock"] | 0 | [] | The function (mock_cachedb) defined within the public class called public.The function start at line 24 and ends at 28. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, and It has 1.0 function call... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | mock_prepare_paths_for_upload | def mock_prepare_paths_for_upload():with patch.object(S3AssetManager, "prepare_paths_for_upload") as mock:yield mock | 1 | 3 | 0 | 18 | 0 | 32 | 34 | 32 | [] | None | {"Expr": 1, "With": 1} | 1 | 3 | 1 | ["patch.object"] | 0 | [] | The function (mock_prepare_paths_for_upload) defined within the public class called public.The function start at line 32 and ends at 34. 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 declare 1.0 function, and It has 1.0 ... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | mock_hash_attachments | def mock_hash_attachments():with patch("deadline.job_attachments.api.manifest._hash_attachments", return_value=(Mock(), [])) as mock:yield mock | 1 | 5 | 0 | 25 | 0 | 38 | 42 | 38 | [] | None | {"Expr": 1, "With": 1} | 2 | 5 | 2 | ["patch", "Mock"] | 0 | [] | The function (mock_hash_attachments) defined within the public class called public.The function start at line 38 and ends at 42. 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 It has 2.0 functi... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | basic_asset_group | def basic_asset_group(tmp_path):root_dir = str(tmp_path)return AssetRootGroup(root_path=root_dir,inputs=set(),outputs=set(),references=set(),) | 1 | 8 | 1 | 37 | 1 | 46 | 53 | 46 | tmp_path | ['root_dir'] | Returns | {"Assign": 1, "Return": 1} | 5 | 8 | 5 | ["str", "AssetRootGroup", "set", "set", "set"] | 0 | [] | The function (basic_asset_group) defined within the public class called public.The function start at line 46 and ends at 53. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 5.0 functions, and It has 5.0 functi... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | mock_upload_group | def mock_upload_group(basic_asset_group):return Mock(asset_groups=[basic_asset_group],total_input_files=1,total_input_bytes=100,) | 1 | 6 | 1 | 23 | 0 | 57 | 62 | 57 | basic_asset_group | [] | Returns | {"Return": 1} | 1 | 6 | 1 | ["Mock"] | 0 | [] | The function (mock_upload_group) defined within the public class called public.The function start at line 57 and ends at 62. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, and It has 1.0 function... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | basic_asset_manifest | def basic_asset_manifest():return AssetManifest(paths=[], hash_alg=HashAlgorithm("xxh128"), total_size=0) | 1 | 2 | 0 | 23 | 0 | 66 | 67 | 66 | [] | Returns | {"Return": 1} | 2 | 2 | 2 | ["AssetManifest", "HashAlgorithm"] | 0 | [] | The function (basic_asset_manifest) defined within the public class called public.The function start at line 66 and ends at 67. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, and It has 2.0 fun... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | mock_attachment_settings | def mock_attachment_settings():return Attachments(manifests=[], fileSystem="").to_dict | 1 | 2 | 0 | 18 | 0 | 71 | 72 | 71 | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["Attachments"] | 0 | [] | The function (mock_attachment_settings) defined within the public class called public.The function start at line 71 and ends at 72. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, and It has 1.0 f... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | mock_init_objects | def mock_init_objects():with patch.object(S3AssetManager, "__init__", lambda self, *args, **kwargs: None), patch.object(S3AssetUploader, "__init__", lambda self, *args, **kwargs: None), patch.object(JobAttachmentS3Settings, "__init__", lambda self, *args, **kwargs: None):yield | 1 | 5 | 0 | 66 | 0 | 76 | 80 | 76 | [] | None | {"Expr": 1, "With": 1} | 3 | 5 | 3 | ["patch.object", "patch.object", "patch.object"] | 0 | [] | The function (mock_init_objects) defined within the public class called public.The function start at line 76 and ends at 80. 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 3.0 functions, and It has 3.0 functions ... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | mock_update_manifest | def mock_update_manifest(basic_asset_manifest):with patch.object(manifest_group, "update_manifest", return_value=basic_asset_manifest) as mock:yield mock | 1 | 3 | 1 | 23 | 0 | 84 | 86 | 84 | basic_asset_manifest | [] | None | {"Expr": 1, "With": 1} | 1 | 3 | 1 | ["patch.object"] | 0 | [] | The function (mock_update_manifest) defined within the public class called public.The function start at line 84 and ends at 86. 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 declare 1.0 function, and It has 1.0 function ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | mock_upload_attachments | def mock_upload_attachments():with patch.object(_submit_job_bundle.api, "_upload_attachments", return_value=MOCK_UPLOAD_ATTACHMENTS_RESPONSE) as mock:yield mock | 1 | 5 | 0 | 24 | 0 | 90 | 94 | 90 | [] | None | {"Expr": 1, "With": 1} | 1 | 5 | 1 | ["patch.object"] | 0 | [] | The function (mock_upload_attachments) defined within the public class called public.The function start at line 90 and ends at 94. 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 declare 1.0 function, and It has 1.0 functi... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | mock_create_manifest_file._mock_create_manifest_file | def _mock_create_manifest_file(input_paths, root_path, hash_cache):return AssetManifest(paths=[BaseManifestPath(path=os.path.join(root_path, "file1.txt"), hash="mock_hash_1", size=0, mtime=0),BaseManifestPath(path=os.path.join(root_path, "subdir1", "file2.txt"),hash="mock_hash_2",size=0,mtime=0,),BaseManifestPath(path=... | 1 | 22 | 3 | 121 | 0 | 99 | 120 | 99 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (mock_create_manifest_file._mock_create_manifest_file) defined within the public class called public.The function start at line 99 and ends at 120. It contains 22 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [99.0] and does not return any value.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | mock_create_manifest_file | def mock_create_manifest_file():def _mock_create_manifest_file(input_paths, root_path, hash_cache):return AssetManifest(paths=[BaseManifestPath(path=os.path.join(root_path, "file1.txt"), hash="mock_hash_1", size=0, mtime=0),BaseManifestPath(path=os.path.join(root_path, "subdir1", "file2.txt"),hash="mock_hash_2",size=0,... | 1 | 6 | 0 | 21 | 0 | 98 | 125 | 98 | [] | Returns | {"Expr": 1, "Return": 1, "With": 1} | 9 | 28 | 9 | ["AssetManifest", "BaseManifestPath", "os.path.join", "BaseManifestPath", "os.path.join", "BaseManifestPath", "os.path.join", "HashAlgorithm", "patch.object"] | 0 | [] | The function (mock_create_manifest_file) defined within the public class called public.The function start at line 98 and ends at 125. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 9.0 functions, and It has 9... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | mock_read_local_manifest._mock_read_local_manifest | def _mock_read_local_manifest(manifest):return AssetManifest(paths=[BaseManifestPath(path="file1.txt", hash="old_hash_1", size=0, mtime=0),BaseManifestPath(path="subdir1/file2.txt", hash="old_hash_2", size=0, mtime=0),BaseManifestPath(path="subdir2/subdir3/file3.txt", hash="old_hash_3", size=0, mtime=0),],hash_alg=Hash... | 1 | 12 | 1 | 82 | 0 | 130 | 141 | 130 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (mock_read_local_manifest._mock_read_local_manifest) defined within the public class called public.The function start at line 130 and ends at 141. 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 | mock_read_local_manifest | def mock_read_local_manifest():def _mock_read_local_manifest(manifest):return AssetManifest(paths=[BaseManifestPath(path="file1.txt", hash="old_hash_1", size=0, mtime=0),BaseManifestPath(path="subdir1/file2.txt", hash="old_hash_2", size=0, mtime=0),BaseManifestPath(path="subdir2/subdir3/file3.txt", hash="old_hash_3", s... | 1 | 4 | 0 | 21 | 0 | 129 | 144 | 129 | [] | Returns | {"Expr": 1, "Return": 1, "With": 1} | 6 | 16 | 6 | ["AssetManifest", "BaseManifestPath", "BaseManifestPath", "BaseManifestPath", "HashAlgorithm", "patch.object"] | 0 | [] | The function (mock_read_local_manifest) defined within the public class called public.The function start at line 129 and ends at 144. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 6.0 functions, and It has 6... | |
aws-deadline_deadline-cloud | TestSnapshot | public | 0 | 0 | test_snapshot_root_directory_only | def test_snapshot_root_directory_only(self, tmp_path, mock_prepare_paths_for_upload, mock_hash_attachments, mock_upload_group):"""Tests if CLI snapshot command calls correctly with an exiting directory path at --root"""root_dir = str(tmp_path)temp_file = tmp_path / "temp_file.txt"temp_file.touch()mock_prepare_paths_for... | 1 | 14 | 5 | 93 | 0 | 174 | 194 | 174 | self,tmp_path,mock_prepare_paths_for_upload,mock_hash_attachments,mock_upload_group | [] | None | {"Assign": 5, "Expr": 4} | 7 | 21 | 7 | ["str", "temp_file.touch", "CliRunner", "runner.invoke", "mock_prepare_paths_for_upload.assert_called_once_with", "str", "mock_hash_attachments.assert_called_once"] | 0 | [] | The function (test_snapshot_root_directory_only) defined within the public class called TestSnapshot.The function start at line 174 and ends at 194. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [174.0] and does not return any value. It declares 7.0 function... |
aws-deadline_deadline-cloud | TestSnapshot | public | 0 | 0 | test_invalid_root_directory | def test_invalid_root_directory(self, tmp_path):"""Tests if CLI snapshot raises error when called with an invalid --root with non-existing directory path"""invalid_root_dir = str(tmp_path / "invalid_dir")runner = CliRunner()result = runner.invoke(main, ["manifest", "snapshot", "--root", invalid_root_dir])assert result.... | 1 | 6 | 2 | 52 | 0 | 196 | 206 | 196 | self,tmp_path | [] | None | {"Assign": 3, "Expr": 1} | 3 | 11 | 3 | ["str", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_invalid_root_directory) defined within the public class called TestSnapshot.The function start at line 196 and ends at 206. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [196.0] and does not return any value. It declares 3.0 functions, and ... |
aws-deadline_deadline-cloud | TestSnapshot | public | 0 | 0 | test_valid_manifest_out | def test_valid_manifest_out(self, tmp_path, mock_prepare_paths_for_upload, mock_hash_attachments, mock_upload_group):"""Tests if CLI snapshot command correctly calls with --manifest-out arguement"""root_dir = str(tmp_path)manifest_out_dir = tmp_path / "manifest_out"manifest_out_dir.mkdir()temp_file = tmp_path / "temp_f... | 1 | 24 | 5 | 105 | 0 | 208 | 238 | 208 | self,tmp_path,mock_prepare_paths_for_upload,mock_hash_attachments,mock_upload_group | [] | None | {"Assign": 6, "Expr": 5} | 8 | 31 | 8 | ["str", "manifest_out_dir.mkdir", "temp_file.touch", "CliRunner", "runner.invoke", "mock_prepare_paths_for_upload.assert_called_once_with", "str", "mock_hash_attachments.assert_called_once"] | 0 | [] | The function (test_valid_manifest_out) defined within the public class called TestSnapshot.The function start at line 208 and ends at 238. It contains 24 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [208.0] and does not return any value. It declares 8.0 functions, and It... |
aws-deadline_deadline-cloud | TestSnapshot | public | 0 | 0 | test_invalid_manifest_out | def test_invalid_manifest_out(self, tmp_path):"""Tests if CLI snapshot raises error when called with invalid --destination with non-existing directory path"""root_dir = str(tmp_path)invalid_manifest_out = str(tmp_path / "nonexistent_dir")runner = CliRunner()result = runner.invoke(main,["manifest", "snapshot", "--root",... | 1 | 10 | 2 | 63 | 0 | 240 | 254 | 240 | self,tmp_path | [] | None | {"Assign": 4, "Expr": 1} | 4 | 15 | 4 | ["str", "str", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_invalid_manifest_out) defined within the public class called TestSnapshot.The function start at line 240 and ends at 254. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [240.0] and does not return any value. It declares 4.0 functions, and ... |
aws-deadline_deadline-cloud | TestSnapshot | public | 0 | 0 | test_asset_snapshot_recursive | def test_asset_snapshot_recursive(self, tmp_path, mock_prepare_paths_for_upload, mock_hash_attachments, mock_upload_group):"""Tests if CLI snapshot works with snapshotting directories with nested data."""root_dir = str(tmp_path)subdir1 = tmp_path / "subdir1"subdir2 = tmp_path / "subdir2"subdir1.mkdir()subdir2.mkdir()(s... | 1 | 18 | 5 | 132 | 0 | 256 | 279 | 256 | self,tmp_path,mock_prepare_paths_for_upload,mock_hash_attachments,mock_upload_group | [] | None | {"Assign": 8, "Expr": 6} | 11 | 24 | 11 | ["str", "subdir1.mkdir", "subdir2.mkdir", "touch", "touch", "str", "str", "CliRunner", "runner.invoke", "set", "mock_hash_attachments.assert_called_once"] | 0 | [] | The function (test_asset_snapshot_recursive) defined within the public class called TestSnapshot.The function start at line 256 and ends at 279. It contains 18 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [256.0] and does not return any value. It declares 11.0 functions, ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_queue_list | def test_cli_queue_list(fresh_deadline_config, mock_telemetry):"""Confirm that the CLI interface prints out the expected list ofqueues, 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_queue... | 1 | 10 | 2 | 81 | 2 | 19 | 41 | 19 | 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_queue_list) defined within the public class called public.The function start at line 19 and ends at 41. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [19.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_queue_list_explicit_farm_id | def test_cli_queue_list_explicit_farm_id(fresh_deadline_config, mock_telemetry):"""Confirm that the CLI interface prints out the expected list ofqueues, given mock data."""with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").list_queues.return_value = {"queues": MOCK_QU... | 1 | 9 | 2 | 77 | 2 | 44 | 64 | 44 | 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_queue_list_explicit_farm_id) defined within the public class called public.The function start at line 44 and ends at 64. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [44.0] and does not return any value. It declares 5.0 functions, and ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_queue_list_override_profile | def test_cli_queue_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")co... | 1 | 12 | 1 | 118 | 2 | 67 | 85 | 67 | 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_with", "list_queues.assert_called_once_with", "client", "session_mock"] | 0 | [] | The function (test_cli_queue_list_override_profile) defined within the public class called public.The function start at line 67 and ends at 85. 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_queue_list_no_farm_id | def test_cli_queue_list_no_farm_id(fresh_deadline_config):with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").list_queues.return_value = {"queues": MOCK_QUEUES_LIST}runner = CliRunner()result = runner.invoke(main, ["queue", "list"])assert "Missing '--farm-id' or defaul... | 1 | 7 | 1 | 68 | 2 | 88 | 96 | 88 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 3, "With": 1} | 5 | 9 | 5 | ["patch.object", "client", "session_mock", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_cli_queue_list_no_farm_id) defined within the public class called public.The function start at line 88 and ends at 96. 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 has 5... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_queue_list_client_error | def test_cli_queue_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_queues.side_effect = ClientError({"Error": {"Message": "A botocore client error"}}, "client error")r... | 1 | 11 | 1 | 91 | 2 | 99 | 112 | 99 | 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_queue_list_client_error) defined within the public class called public.The function start at line 99 and ends at 112. 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 h... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_queue_get | def test_cli_queue_get(fresh_deadline_config):"""Confirm that the CLI interface prints out the expected queue, given mock data."""with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").get_queue.return_value = MOCK_QUEUES_LIST[0]runner = CliRunner()result = runner.invoke(... | 1 | 22 | 1 | 113 | 2 | 115 | 147 | 115 | fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 3, "Expr": 2, "With": 1} | 8 | 33 | 8 | ["patch.object", "client", "session_mock", "CliRunner", "runner.invoke", "get_queue.assert_called_once_with", "client", "session_mock"] | 0 | [] | The function (test_cli_queue_get) defined within the public class called public.The function start at line 115 and ends at 147. 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 8.0 functions, and It has 8.0 functi... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | checkpoint_dir | def checkpoint_dir(tmp_path_factory):"""Create a checkpoint directory for all tests to use."""checkpoint_dir = tmp_path_factory.mktemp("checkpoint")yield str(checkpoint_dir) | 1 | 3 | 1 | 19 | 1 | 53 | 56 | 53 | tmp_path_factory | ['checkpoint_dir'] | None | {"Assign": 1, "Expr": 2} | 2 | 4 | 2 | ["tmp_path_factory.mktemp", "str"] | 0 | [] | The function (checkpoint_dir) defined within the public class called public.The function start at line 53 and ends at 56. 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 functions cal... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | deadline_telemetry_client_mock | def deadline_telemetry_client_mock():with patch.object(deadline.client.api, "get_deadline_cloud_library_telemetry_client") as m:yield m | 1 | 3 | 0 | 22 | 0 | 61 | 63 | 61 | [] | None | {"Expr": 1, "With": 1} | 1 | 3 | 1 | ["patch.object"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_queue_incremental_download_py.test_incremental_output_download_stats_telemetry"] | The function (deadline_telemetry_client_mock) defined within the public class called public.The function start at line 61 and ends at 63. 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 declare 1.0 function, It has 1.0 func... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_incremental_output_download_requires_queue_with_job_attachments | def test_incremental_output_download_requires_queue_with_job_attachments(fresh_deadline_config, deadline_mock, checkpoint_dir):# The response does not include the "jobAttachmentSettings" fielddeadline_mock.get_queue.return_value = {"queueId": MOCK_QUEUE_ID,"displayName": "Mock Queue",}# Run the CLI command once to boot... | 1 | 27 | 3 | 88 | 2 | 69 | 101 | 69 | fresh_deadline_config,deadline_mock,checkpoint_dir | ['runner', 'result'] | None | {"Assign": 3, "With": 1} | 4 | 33 | 4 | ["CliRunner", "freeze_time", "runner.invoke", "pytest.mark.skipif"] | 0 | [] | The function (test_incremental_output_download_requires_queue_with_job_attachments) defined within the public class called public.The function start at line 69 and ends at 101. It contains 27 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [69.0] and does not return any valu... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_incremental_output_download_pid_lock_already_held_error | def test_incremental_output_download_pid_lock_already_held_error(fresh_deadline_config,deadline_mock,checkpoint_dir,):"""Test incremental_output_download when PidLockAlreadyHeld is raised"""# Write a fake PID to the filepid_lock_file = os.path.join(checkpoint_dir, f"{MOCK_QUEUE_ID}_ignore-storage-profiles_download_chec... | 1 | 33 | 3 | 124 | 3 | 107 | 148 | 107 | fresh_deadline_config,deadline_mock,checkpoint_dir | ['result', 'runner', 'pid_lock_file'] | None | {"Assign": 4, "Expr": 2, "With": 2} | 9 | 42 | 9 | ["os.path.join", "open", "f.write", "CliRunner", "patch.object", "runner.invoke", "os.path.join", "os.path.exists", "pytest.mark.skipif"] | 0 | [] | The function (test_incremental_output_download_pid_lock_already_held_error) defined within the public class called public.The function start at line 107 and ends at 148. It contains 33 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [107.0] and does not return any value. It ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_incremental_output_download_storage_profile_options_mutually_exclusive | def test_incremental_output_download_storage_profile_options_mutually_exclusive(fresh_deadline_config,deadline_mock,checkpoint_dir,):"""Test that --storage-profile-id and --ignore-storage-profiles can't be provided together"""# Run the CLI commandrunner = CliRunner()with patch.object(psutil, "pid_exists") as mock_pid_e... | 1 | 29 | 3 | 89 | 2 | 154 | 187 | 154 | fresh_deadline_config,deadline_mock,checkpoint_dir | ['runner', 'result'] | None | {"Assign": 3, "Expr": 1, "With": 1} | 4 | 34 | 4 | ["CliRunner", "patch.object", "runner.invoke", "pytest.mark.skipif"] | 0 | [] | The function (test_incremental_output_download_storage_profile_options_mutually_exclusive) defined within the public class called public.The function start at line 154 and ends at 187. It contains 29 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [154.0] and does not return... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_incremental_output_download_bootstrap_and_completion | def test_incremental_output_download_bootstrap_and_completion(fresh_deadline_config,deadline_mock,checkpoint_dir,storage_profile_id,):"""Test a new job through bootstrap, completion, and retirement. Both without storage profiles,and with the job storage profile matching the local one."""mock_jobs = create_fake_job_list... | 4 | 175 | 4 | 774 | 5 | 194 | 407 | 194 | fresh_deadline_config,deadline_mock,checkpoint_dir,storage_profile_id | ['storage_profile_in_message', 'mock_jobs', 'runner', 'result', 'storage_profile_options'] | None | {"Assign": 21, "Expr": 1, "If": 3, "With": 4} | 33 | 214 | 33 | ["create_fake_job_list", "mock_search_jobs_for_set", "mock_get_job_for_set", "CliRunner", "freeze_time", "runner.invoke", "os.path.join", "isoformat", "astimezone", "datetime.fromisoformat", "datetime.fromisoformat", "freeze_time", "runner.invoke", "os.path.join", "isoformat", "astimezone", "datetime.fromisoformat", "f... | 0 | [] | The function (test_incremental_output_download_bootstrap_and_completion) defined within the public class called public.The function start at line 194 and ends at 407. It contains 175 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [194.0] and does not return any value. It de... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_incremental_output_download_storage_profile_path_mapping.mock_get_storage_profile_for_queue | def mock_get_storage_profile_for_queue(farmId: str, queueId: str, storageProfileId: str):assert farmId == MOCK_FARM_IDassert queueId == MOCK_QUEUE_IDif storageProfileId == MOCK_STORAGE_PROFILE_ID:return {"storageProfileId": MOCK_STORAGE_PROFILE_ID,"displayName": "Mock-Storage-Profile-For-Job","osFamily": "MACOS","fileS... | 2 | 23 | 3 | 146 | 0 | 441 | 463 | 441 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_incremental_output_download_storage_profile_path_mapping.mock_get_storage_profile_for_queue) defined within the public class called public.The function start at line 441 and ends at 463. It contains 23 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [441.0... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_incremental_output_download_storage_profile_path_mapping | def test_incremental_output_download_storage_profile_path_mapping(fresh_deadline_config,tmp_path,deadline_mock,checkpoint_dir,):"""Test a new job with a different storage profile on the job thanconfigured locally so as to get some path mapping rules."""mock_jobs = create_fake_job_list(1)mock_jobs[0]["name"] = "Mock Job... | 1 | 116 | 4 | 460 | 3 | 413 | 566 | 413 | fresh_deadline_config,tmp_path,deadline_mock,checkpoint_dir | ['result', 'runner', 'mock_jobs'] | Returns | {"Assign": 14, "Expr": 1, "If": 1, "Return": 2, "With": 1} | 13 | 154 | 13 | ["create_fake_job_list", "mock_search_jobs_for_set", "mock_get_job_for_set", "value.upper", "StorageProfileOperatingSystemFamily.get_host_os_family", "str", "str", "CliRunner", "freeze_time", "runner.invoke", "value.upper", "StorageProfileOperatingSystemFamily.get_host_os_family", "pytest.mark.skipif"] | 0 | [] | The function (test_incremental_output_download_storage_profile_path_mapping) defined within the public class called public.The function start at line 413 and ends at 566. It contains 116 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [413.0], and this function return a valu... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_incremental_output_download_bootstrap_retire_job_without_attachments | def test_incremental_output_download_bootstrap_retire_job_without_attachments(fresh_deadline_config, deadline_mock, checkpoint_dir):"""Test a new job through bootstrap and completion over two incremental download commands."""mock_jobs = create_fake_job_list(1)mock_jobs[0]["name"] = "Mock Job"mock_jobs[0]["jobId"] = MOC... | 1 | 104 | 3 | 466 | 3 | 572 | 702 | 572 | fresh_deadline_config,deadline_mock,checkpoint_dir | ['result', 'runner', 'mock_jobs'] | None | {"Assign": 14, "Expr": 1, "With": 3} | 25 | 131 | 25 | ["create_fake_job_list", "mock_search_jobs_for_set", "mock_get_job_for_set", "CliRunner", "freeze_time", "runner.invoke", "os.path.join", "isoformat", "astimezone", "datetime.fromisoformat", "datetime.fromisoformat", "freeze_time", "runner.invoke", "os.path.join", "isoformat", "astimezone", "datetime.fromisoformat", "f... | 0 | [] | The function (test_incremental_output_download_bootstrap_retire_job_without_attachments) defined within the public class called public.The function start at line 572 and ends at 702. It contains 104 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [572.0] and does not return ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_incremental_output_download_job_unchanged | def test_incremental_output_download_job_unchanged(fresh_deadline_config, deadline_mock, checkpoint_dir):"""Test a new job through bootstrap and an 'UNCHANGED' message."""mock_jobs = create_fake_job_list(1)mock_jobs[0]["name"] = "Mock Job"mock_jobs[0]["jobId"] = MOCK_JOB_IDmock_jobs[0]["taskRunStatus"] = "READY"mock_jo... | 1 | 78 | 3 | 368 | 3 | 708 | 800 | 708 | fresh_deadline_config,deadline_mock,checkpoint_dir | ['result', 'runner', 'mock_jobs'] | None | {"Assign": 11, "Expr": 1, "With": 2} | 17 | 93 | 17 | ["create_fake_job_list", "mock_search_jobs_for_set", "mock_get_job_for_set", "CliRunner", "freeze_time", "runner.invoke", "os.path.join", "isoformat", "astimezone", "datetime.fromisoformat", "freeze_time", "runner.invoke", "os.path.join", "isoformat", "astimezone", "datetime.fromisoformat", "pytest.mark.skipif"] | 0 | [] | The function (test_incremental_output_download_job_unchanged) defined within the public class called public.The function start at line 708 and ends at 800. It contains 78 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [708.0] and does not return any value. It declares 17.0 ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_incremental_output_download_job_canceled | def test_incremental_output_download_job_canceled(fresh_deadline_config, deadline_mock, checkpoint_dir):"""Test a new job through bootstrap and cancelation before it's complete"""mock_jobs = create_fake_job_list(1)mock_jobs[0]["name"] = "Mock Job"mock_jobs[0]["jobId"] = MOCK_JOB_IDmock_jobs[0]["taskRunStatus"] = "READY... | 1 | 87 | 3 | 407 | 3 | 806 | 907 | 806 | fresh_deadline_config,deadline_mock,checkpoint_dir | ['result', 'runner', 'mock_jobs'] | None | {"Assign": 13, "Expr": 1, "With": 2} | 17 | 102 | 17 | ["create_fake_job_list", "mock_search_jobs_for_set", "mock_get_job_for_set", "CliRunner", "freeze_time", "runner.invoke", "os.path.join", "isoformat", "astimezone", "datetime.fromisoformat", "freeze_time", "runner.invoke", "os.path.join", "isoformat", "astimezone", "datetime.fromisoformat", "pytest.mark.skipif"] | 0 | [] | The function (test_incremental_output_download_job_canceled) defined within the public class called public.The function start at line 806 and ends at 907. It contains 87 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [806.0] and does not return any value. It declares 17.0 f... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_incremental_output_download_job_completed_then_requeued | def test_incremental_output_download_job_completed_then_requeued(fresh_deadline_config, deadline_mock, checkpoint_dir):"""Test a new job through bootstrap, retirement, then requeue."""iso_freeze_time = datetime.fromisoformat(ISO_FREEZE_TIME)mock_jobs = create_fake_job_list(1, iso_freeze_time - timedelta(minutes=5), iso... | 1 | 115 | 3 | 546 | 4 | 913 | 1,050 | 913 | fresh_deadline_config,deadline_mock,checkpoint_dir | ['result', 'runner', 'mock_jobs', 'iso_freeze_time'] | None | {"Assign": 16, "Expr": 1, "With": 3} | 27 | 138 | 27 | ["datetime.fromisoformat", "create_fake_job_list", "timedelta", "timedelta", "mock_search_jobs_for_set", "mock_get_job_for_set", "CliRunner", "freeze_time", "runner.invoke", "os.path.join", "isoformat", "astimezone", "timedelta", "freeze_time", "runner.invoke", "os.path.join", "isoformat", "astimezone", "timedelta", "f... | 0 | [] | The function (test_incremental_output_download_job_completed_then_requeued) defined within the public class called public.The function start at line 913 and ends at 1050. It contains 115 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [913.0] and does not return any value. I... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_incremental_output_download_dry_run | def test_incremental_output_download_dry_run(fresh_deadline_config, deadline_mock, checkpoint_dir):"""Test a new job through bootstrap, completion, and retirement."""mock_jobs = create_fake_job_list(1)mock_jobs[0]["name"] = "Mock Job"mock_jobs[0]["jobId"] = MOCK_JOB_IDmock_jobs[0]["taskRunStatus"] = "READY"mock_jobs[0]... | 1 | 53 | 3 | 269 | 3 | 1,056 | 1,116 | 1,056 | fresh_deadline_config,deadline_mock,checkpoint_dir | ['result', 'runner', 'mock_jobs'] | None | {"Assign": 10, "Expr": 1, "With": 1} | 11 | 61 | 11 | ["create_fake_job_list", "mock_search_jobs_for_set", "mock_get_job_for_set", "CliRunner", "freeze_time", "runner.invoke", "os.path.join", "isoformat", "astimezone", "datetime.fromisoformat", "pytest.mark.skipif"] | 0 | [] | The function (test_incremental_output_download_dry_run) defined within the public class called public.The function start at line 1056 and ends at 1116. It contains 53 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [1056.0] and does not return any value. It declares 11.0 fun... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_incremental_output_download_stats_telemetry | def test_incremental_output_download_stats_telemetry(fresh_deadline_config,deadline_mock,checkpoint_dir,deadline_telemetry_client_mock,):"""Verifies the telemetry event for statistics matches the expected format"""mock_job = create_fake_job_list(1)[0]mock_job.update({"name": "Mock Job","jobId": MOCK_JOB_ID,"taskRunStat... | 1 | 66 | 4 | 258 | 2 | 1,122 | 1,191 | 1,122 | fresh_deadline_config,deadline_mock,checkpoint_dir,deadline_telemetry_client_mock | ['runner', 'mock_job'] | None | {"Assign": 4, "Expr": 4, "With": 1} | 10 | 70 | 10 | ["create_fake_job_list", "mock_job.update", "mock_search_jobs_for_set", "mock_get_job_for_set", "CliRunner", "freeze_time", "runner.invoke", "record_event.assert_called_once_with", "deadline_telemetry_client_mock", "pytest.mark.skipif"] | 0 | [] | The function (test_incremental_output_download_stats_telemetry) defined within the public class called public.The function start at line 1122 and ends at 1191. It contains 66 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [1122.0] and does not return any value. It declares ... |
aws-deadline_deadline-cloud | TestSigIntHAndler | public | 0 | 0 | test_singleton_instance | def test_singleton_instance(self):"""Ensures that only one instance of SigIntHandler can exist"""handler1 = SigIntHandler()handler2 = SigIntHandler()assert handler1 is handler2 | 1 | 4 | 1 | 20 | 0 | 7 | 11 | 7 | self | [] | None | {"Assign": 2, "Expr": 1} | 2 | 5 | 2 | ["SigIntHandler", "SigIntHandler"] | 0 | [] | The function (test_singleton_instance) defined within the public class called TestSigIntHAndler.The function start at line 7 and ends at 11. It contains 4 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 ha... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | add_mocks_for_worker_list | def add_mocks_for_worker_list(deadline_mock):"""Adds mock return values to the deadline_mock for sharing acrossthe different 'deadline worker list' tests."""deadline_mock.search_workers.return_value = {"totalResults": 2,"workers": [{"workerId": "worker-1234567890abcdef1234567890abcdef","status": "RUNNING","createdAt": ... | 1 | 52 | 1 | 221 | 0 | 20 | 75 | 20 | deadline_mock | [] | None | {"Assign": 1, "Expr": 1} | 4 | 56 | 4 | ["datetime.fromisoformat", "datetime.fromisoformat", "datetime.fromisoformat", "datetime.fromisoformat"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_worker_py.test_cli_worker_list_success"] | The function (add_mocks_for_worker_list) defined within the public class called public.The function start at line 20 and ends at 75. It contains 52 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 functions, It has 4.0 functi... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | add_mocks_for_worker_get | def add_mocks_for_worker_get(deadline_mock):"""Adds mock return values to the deadline_mock for sharing acrossthe different 'deadline worker get' tests."""deadline_mock.get_worker.return_value = {"workerId": MOCK_WORKER_ID,"status": "RUNNING","createdAt": datetime.fromisoformat("2024-01-01T10:00:00+00:00"),"updatedAt":... | 1 | 30 | 1 | 139 | 0 | 78 | 111 | 78 | deadline_mock | [] | None | {"Assign": 1, "Expr": 1} | 2 | 34 | 2 | ["datetime.fromisoformat", "datetime.fromisoformat"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.cli.test_cli_worker_py.test_cli_worker_get_success"] | The function (add_mocks_for_worker_get) defined within the public class called public.The function start at line 78 and ends at 111. It contains 30 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, It has 2.0 functi... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_worker_list_success | def test_cli_worker_list_success(fresh_deadline_config, deadline_mock):"""Tests that 'deadline worker list' successfully lists workers in a fleet."""add_mocks_for_worker_list(deadline_mock)runner = CliRunner()result = runner.invoke(main,["worker","list","--farm-id",MOCK_FARM_ID,"--fleet-id",MOCK_FLEET_ID,],)# Verify th... | 1 | 29 | 2 | 80 | 3 | 114 | 151 | 114 | fresh_deadline_config,deadline_mock | ['expected_output', 'runner', 'result'] | None | {"Assign": 3, "Expr": 3} | 4 | 38 | 4 | ["add_mocks_for_worker_list", "CliRunner", "runner.invoke", "deadline_mock.search_workers.assert_called_once_with"] | 0 | [] | The function (test_cli_worker_list_success) defined within the public class called public.The function start at line 114 and ends at 151. It contains 29 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [114.0] and does not return any value. It declares 4.0 functions, and It ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_worker_list_pagination | def test_cli_worker_list_pagination(fresh_deadline_config, deadline_mock):"""Tests that 'deadline worker list' correctly handles custom page-size and item-offset parameters."""# Mock response for pagination test with custom parametersdeadline_mock.search_workers.return_value = {"totalResults": 50,"workers": [{"workerId... | 1 | 61 | 2 | 185 | 3 | 154 | 224 | 154 | fresh_deadline_config,deadline_mock | ['expected_output', 'runner', 'result'] | None | {"Assign": 4, "Expr": 2} | 6 | 71 | 6 | ["datetime.fromisoformat", "datetime.fromisoformat", "datetime.fromisoformat", "CliRunner", "runner.invoke", "deadline_mock.search_workers.assert_called_once_with"] | 0 | [] | The function (test_cli_worker_list_pagination) defined within the public class called public.The function start at line 154 and ends at 224. It contains 61 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 6.0 functions, and ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_worker_list_empty_results | def test_cli_worker_list_empty_results(fresh_deadline_config, deadline_mock):"""Tests that 'deadline worker list' handles empty worker list scenario appropriately."""# Mock response for empty resultsdeadline_mock.search_workers.return_value = {"totalResults": 0, "workers": []}runner = CliRunner()result = runner.invoke(... | 1 | 26 | 2 | 96 | 3 | 227 | 262 | 227 | fresh_deadline_config,deadline_mock | ['expected_output', 'runner', 'result'] | None | {"Assign": 4, "Expr": 2} | 3 | 36 | 3 | ["CliRunner", "runner.invoke", "deadline_mock.search_workers.assert_called_once_with"] | 0 | [] | The function (test_cli_worker_list_empty_results) defined within the public class called public.The function start at line 227 and ends at 262. It contains 26 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [227.0] and does not return any value. It declares 3.0 functions, an... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_worker_list_missing_fleet_id | def test_cli_worker_list_missing_fleet_id(fresh_deadline_config, deadline_mock):"""Tests that 'deadline worker list' displays usage message and exits with code 2 when required --fleet-id is missing."""runner = CliRunner()result = runner.invoke(main,["worker","list","--farm-id",MOCK_FARM_ID,# Missing --fleet-id paramete... | 1 | 14 | 2 | 52 | 2 | 265 | 286 | 265 | fresh_deadline_config,deadline_mock | ['runner', 'result'] | None | {"Assign": 2, "Expr": 2} | 3 | 22 | 3 | ["CliRunner", "runner.invoke", "deadline_mock.search_workers.assert_not_called"] | 0 | [] | The function (test_cli_worker_list_missing_fleet_id) defined within the public class called public.The function start at line 265 and ends at 286. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [265.0] and does not return any value. It declares 3.0 functions,... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_worker_list_api_error | def test_cli_worker_list_api_error(fresh_deadline_config, deadline_mock):"""Tests that 'deadline worker list' handles AWS ClientError scenarios appropriately."""# Test incorrect fleet-id scenariodeadline_mock.search_workers.side_effect = ClientError(error_response={"Error": {"Code": "ValidationException","Message": "Fl... | 1 | 28 | 2 | 109 | 2 | 289 | 325 | 289 | fresh_deadline_config,deadline_mock | ['runner', 'result'] | None | {"Assign": 3, "Expr": 2} | 4 | 37 | 4 | ["ClientError", "CliRunner", "runner.invoke", "deadline_mock.search_workers.assert_called_once_with"] | 0 | [] | The function (test_cli_worker_list_api_error) defined within the public class called public.The function start at line 289 and ends at 325. It contains 28 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [289.0] and does not return any value. It declares 4.0 functions, and I... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_worker_list_api_error_network_timeout | def test_cli_worker_list_api_error_network_timeout(fresh_deadline_config, deadline_mock):"""Tests that 'deadline worker list' handles network timeout ClientError scenarios."""# Test network timeout scenariodeadline_mock.search_workers.side_effect = ClientError(error_response={"Error": {"Code": "RequestTimeout", "Messag... | 1 | 23 | 2 | 108 | 2 | 328 | 359 | 328 | fresh_deadline_config,deadline_mock | ['runner', 'result'] | None | {"Assign": 3, "Expr": 2} | 4 | 32 | 4 | ["ClientError", "CliRunner", "runner.invoke", "deadline_mock.search_workers.assert_called_once_with"] | 0 | [] | The function (test_cli_worker_list_api_error_network_timeout) defined within the public class called public.The function start at line 328 and ends at 359. It contains 23 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [328.0] and does not return any value. It declares 4.0 f... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_worker_list_api_error_throttling | def test_cli_worker_list_api_error_throttling(fresh_deadline_config, deadline_mock):"""Tests that 'deadline worker list' handles throttling ClientError scenarios."""# Test throttling scenariodeadline_mock.search_workers.side_effect = ClientError(error_response={"Error": {"Code": "ThrottlingException", "Message": "Rate ... | 1 | 23 | 2 | 108 | 2 | 362 | 393 | 362 | fresh_deadline_config,deadline_mock | ['runner', 'result'] | None | {"Assign": 3, "Expr": 2} | 4 | 32 | 4 | ["ClientError", "CliRunner", "runner.invoke", "deadline_mock.search_workers.assert_called_once_with"] | 0 | [] | The function (test_cli_worker_list_api_error_throttling) defined within the public class called public.The function start at line 362 and ends at 393. It contains 23 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [362.0] and does not return any value. It declares 4.0 functi... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_worker_get_success | def test_cli_worker_get_success(fresh_deadline_config, deadline_mock):"""Tests that 'deadline worker get' successfully retrieves and displays complete worker details."""add_mocks_for_worker_get(deadline_mock)runner = CliRunner()result = runner.invoke(main,["worker","get","--farm-id",MOCK_FARM_ID,"--fleet-id",MOCK_FLEET... | 1 | 28 | 2 | 126 | 3 | 396 | 461 | 396 | fresh_deadline_config,deadline_mock | ['expected_output', 'runner', 'result'] | None | {"Assign": 3, "Expr": 3} | 4 | 66 | 4 | ["add_mocks_for_worker_get", "CliRunner", "runner.invoke", "deadline_mock.get_worker.assert_called_once_with"] | 0 | [] | The function (test_cli_worker_get_success) defined within the public class called public.The function start at line 396 and ends at 461. It contains 28 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [396.0] and does not return any value. It declares 4.0 functions, and It h... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_worker_get_missing_required_options | def test_cli_worker_get_missing_required_options(fresh_deadline_config, deadline_mock):"""Tests that 'deadline worker get' displays appropriate error messages and exit codes for missing required parameters."""runner = CliRunner()# Test missing --fleet-idresult = runner.invoke(main,["worker","get","--farm-id",MOCK_FARM_... | 1 | 42 | 2 | 138 | 2 | 464 | 530 | 464 | fresh_deadline_config,deadline_mock | ['runner', 'result'] | None | {"Assign": 4, "Expr": 4} | 7 | 67 | 7 | ["CliRunner", "runner.invoke", "deadline_mock.get_worker.assert_not_called", "runner.invoke", "deadline_mock.get_worker.assert_not_called", "runner.invoke", "deadline_mock.get_worker.assert_not_called"] | 0 | [] | The function (test_cli_worker_get_missing_required_options) defined within the public class called public.The function start at line 464 and ends at 530. It contains 42 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [464.0] and does not return any value. It declares 7.0 fun... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_worker_get_api_error | def test_cli_worker_get_api_error(fresh_deadline_config, deadline_mock):"""Tests that 'deadline worker get' handles AWS ClientError scenarios appropriately."""# Test incorrect worker-id scenario with ResourceNotFoundExceptiondeadline_mock.get_worker.side_effect = ClientError(error_response={"Error": {"Code": "ResourceN... | 1 | 30 | 2 | 113 | 2 | 533 | 572 | 533 | fresh_deadline_config,deadline_mock | ['runner', 'result'] | None | {"Assign": 3, "Expr": 2} | 4 | 40 | 4 | ["ClientError", "CliRunner", "runner.invoke", "deadline_mock.get_worker.assert_called_once_with"] | 0 | [] | The function (test_cli_worker_get_api_error) defined within the public class called public.The function start at line 533 and ends at 572. It contains 30 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [533.0] and does not return any value. It declares 4.0 functions, and It... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_worker_get_api_error_validation_exception | def test_cli_worker_get_api_error_validation_exception(fresh_deadline_config, deadline_mock):"""Tests that 'deadline worker get' handles ValidationException for incorrect worker-id format."""# Test incorrect worker-id format scenariodeadline_mock.get_worker.side_effect = ClientError(error_response={"Error": {"Code": "V... | 1 | 31 | 2 | 113 | 2 | 575 | 615 | 575 | fresh_deadline_config,deadline_mock | ['runner', 'result'] | None | {"Assign": 3, "Expr": 2} | 4 | 41 | 4 | ["ClientError", "CliRunner", "runner.invoke", "deadline_mock.get_worker.assert_called_once_with"] | 0 | [] | The function (test_cli_worker_get_api_error_validation_exception) defined within the public class called public.The function start at line 575 and ends at 615. It contains 31 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [575.0] and does not return any value. It declares 4... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_worker_get_api_error_network_timeout | def test_cli_worker_get_api_error_network_timeout(fresh_deadline_config, deadline_mock):"""Tests that 'deadline worker get' handles network timeout ClientError scenarios."""# Test network timeout scenariodeadline_mock.get_worker.side_effect = ClientError(error_response={"Error": {"Code": "RequestTimeout", "Message": "R... | 1 | 26 | 2 | 112 | 2 | 618 | 653 | 618 | fresh_deadline_config,deadline_mock | ['runner', 'result'] | None | {"Assign": 3, "Expr": 2} | 4 | 36 | 4 | ["ClientError", "CliRunner", "runner.invoke", "deadline_mock.get_worker.assert_called_once_with"] | 0 | [] | The function (test_cli_worker_get_api_error_network_timeout) defined within the public class called public.The function start at line 618 and ends at 653. It contains 26 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [618.0] and does not return any value. It declares 4.0 fu... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_worker_get_api_error_throttling | def test_cli_worker_get_api_error_throttling(fresh_deadline_config, deadline_mock):"""Tests that 'deadline worker get' handles throttling ClientError scenarios."""# Test throttling scenariodeadline_mock.get_worker.side_effect = ClientError(error_response={"Error": {"Code": "ThrottlingException", "Message": "Rate exceed... | 1 | 26 | 2 | 112 | 2 | 656 | 691 | 656 | fresh_deadline_config,deadline_mock | ['runner', 'result'] | None | {"Assign": 3, "Expr": 2} | 4 | 36 | 4 | ["ClientError", "CliRunner", "runner.invoke", "deadline_mock.get_worker.assert_called_once_with"] | 0 | [] | The function (test_cli_worker_get_api_error_throttling) defined within the public class called public.The function start at line 656 and ends at 691. It contains 26 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 4.0 functio... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_cli_worker_get_api_error_service_unavailable | def test_cli_worker_get_api_error_service_unavailable(fresh_deadline_config, deadline_mock):"""Tests that 'deadline worker get' handles service unavailable ClientError scenarios."""# Test service unavailable scenariodeadline_mock.get_worker.side_effect = ClientError(error_response={"Error": {"Code": "ServiceUnavailable... | 1 | 31 | 2 | 113 | 2 | 694 | 734 | 694 | fresh_deadline_config,deadline_mock | ['runner', 'result'] | None | {"Assign": 3, "Expr": 2} | 4 | 41 | 4 | ["ClientError", "CliRunner", "runner.invoke", "deadline_mock.get_worker.assert_called_once_with"] | 0 | [] | The function (test_cli_worker_get_api_error_service_unavailable) defined within the public class called public.The function start at line 694 and ends at 734. It contains 31 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [694.0] and does not return any value. It declares 4.... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | temp_dir | def temp_dir():"""Fixture to provide a temporary directory that is cleaned up after tests."""with tempfile.TemporaryDirectory() as tmpdir:yield tmpdir | 1 | 3 | 0 | 16 | 0 | 24 | 29 | 24 | [] | None | {"Expr": 2, "With": 1} | 1 | 6 | 1 | ["tempfile.TemporaryDirectory"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3924769_jaraco_zipp.tests.test_path_py.TestPath.zipfile_ondisk"] | The function (temp_dir) defined within the public class called public.The function start at line 24 and ends at 29. 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 declare 1.0 function, It has 1.0 function called inside whi... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | temp_pid_lock_file | def temp_pid_lock_file(temp_dir):"""Fixture to provide a pid file lock name in the temporary directory"""yield os.path.join(temp_dir, "pid_lock_file.pid") | 1 | 2 | 1 | 17 | 0 | 33 | 37 | 33 | temp_dir | [] | None | {"Expr": 2} | 1 | 5 | 1 | ["os.path.join"] | 0 | [] | The function (temp_pid_lock_file) defined within the public class called public.The function start at line 33 and ends at 37. 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 declare 1.0 function, and It has 1.0 function ca... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_pidlock_acquire_and_release | def test_pidlock_acquire_and_release(temp_pid_lock_file):"""Tests normal pidlock acquisition/release."""# Lock file does not exist before acquiring the lockassert not os.path.exists(temp_pid_lock_file)_try_acquire_pid_lock(temp_pid_lock_file)# Lock file exists after acquiring the lockassert os.path.exists(temp_pid_lock... | 1 | 8 | 1 | 66 | 0 | 40 | 59 | 40 | temp_pid_lock_file | [] | None | {"Expr": 3, "With": 1} | 9 | 20 | 9 | ["os.path.exists", "_try_acquire_pid_lock", "os.path.exists", "open", "int", "fh.read", "os.getpid", "_release_pid_lock", "os.path.exists"] | 0 | [] | The function (test_pidlock_acquire_and_release) defined within the public class called public.The function start at line 40 and ends at 59. 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 9.0 functions, and It has... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_pidlock_contextmanager_acquire_and_release | def test_pidlock_contextmanager_acquire_and_release(temp_pid_lock_file):"""Tests normal pidlock acquisition/release with the context manager."""# Lock file does not exist before acquiring the lockassert not os.path.exists(temp_pid_lock_file)with PidFileLock(temp_pid_lock_file):# Lock file exists after acquiring the loc... | 1 | 7 | 1 | 64 | 0 | 62 | 78 | 62 | temp_pid_lock_file | [] | None | {"Expr": 1, "With": 2} | 8 | 17 | 8 | ["os.path.exists", "PidFileLock", "os.path.exists", "open", "fh.read", "str", "os.getpid", "os.path.exists"] | 0 | [] | The function (test_pidlock_contextmanager_acquire_and_release) defined within the public class called public.The function start at line 62 and ends at 78. 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 8.0 functio... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_check_pid_lock_when_process_not_running | def test_check_pid_lock_when_process_not_running(temp_pid_lock_file):"""Tests when PID file exists but process is not running.This is the case when a run was terminated mid-way causing a stale pid file to exist."""# Write a PID that doesn't exist to the lock filewith open(temp_pid_lock_file, "w") as fh:fh.write(str(FAK... | 1 | 12 | 1 | 91 | 1 | 81 | 103 | 81 | temp_pid_lock_file | ['warning_message'] | None | {"Assign": 1, "Expr": 3, "With": 3} | 9 | 23 | 9 | ["open", "fh.write", "str", "patch.object", "_try_acquire_pid_lock", "open", "fh.read", "str", "os.getpid"] | 0 | [] | The function (test_check_pid_lock_when_process_not_running) defined within the public class called public.The function start at line 81 and ends at 103. 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 9.0 function... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_check_pid_lock_with_corrupt_pidfile | def test_check_pid_lock_with_corrupt_pidfile(temp_pid_lock_file):"""Tests when PID file exists and contains corrupted data.In this case it should delete the file and log a warning."""# Write a PID that doesn't exist to the lock filewith open(temp_pid_lock_file, "w") as fh:fh.write("bad_data")# Patch the logger object t... | 1 | 10 | 1 | 85 | 1 | 106 | 126 | 106 | temp_pid_lock_file | ['warning_message'] | None | {"Assign": 1, "Expr": 3, "With": 3} | 8 | 21 | 8 | ["open", "fh.write", "patch.object", "_try_acquire_pid_lock", "open", "fh.read", "str", "os.getpid"] | 0 | [] | The function (test_check_pid_lock_with_corrupt_pidfile) defined within the public class called public.The function start at line 106 and ends at 126. 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 8.0 functions, ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_check_pid_lock_when_process_running.FAKE_PID_exists | def FAKE_PID_exists(pid):return pid == FAKE_PID | 1 | 2 | 1 | 9 | 0 | 139 | 140 | 139 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_check_pid_lock_when_process_running.FAKE_PID_exists) defined within the public class called public.The function start at line 139 and ends at 140. 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.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_check_pid_lock_when_process_running | def test_check_pid_lock_when_process_running(temp_pid_lock_file):"""Tests when PID file exists and process is running.This is the case when a process is already holding the lock."""# Write a PID that doesn't exist to the lock file (value is larger than PIDs are typically)with open(temp_pid_lock_file, "w") as fh:fh.writ... | 1 | 14 | 1 | 95 | 0 | 129 | 154 | 129 | temp_pid_lock_file | [] | Returns | {"Expr": 3, "Return": 1, "With": 4} | 11 | 26 | 11 | ["open", "fh.write", "str", "patch.object", "pytest.raises", "_try_acquire_pid_lock", "str", "os.path.exists", "open", "fh.read", "str"] | 0 | [] | The function (test_check_pid_lock_when_process_running) defined within the public class called public.The function start at line 129 and ends at 154. It contains 14 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 11.0 functi... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_release_pid_lock_when_pid_does_not_match.FAKE_PID_exists | def FAKE_PID_exists(pid):return pid == FAKE_PID | 1 | 2 | 1 | 9 | 0 | 169 | 170 | 169 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_release_pid_lock_when_pid_does_not_match.FAKE_PID_exists) defined within the public class called public.The function start at line 169 and ends at 170. 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.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_release_pid_lock_when_pid_does_not_match | def test_release_pid_lock_when_pid_does_not_match(temp_pid_lock_file):"""Tests releasing a PID lock when the PID doesn't match the current process.This happens when another process started concurrently and incorrectly claimedthe lock. Since the error is in a different process, it prints a warning andleaves the file."""... | 1 | 15 | 1 | 117 | 1 | 157 | 186 | 157 | temp_pid_lock_file | ['warning_message'] | Returns | {"Assign": 1, "Expr": 3, "Return": 1, "With": 3} | 11 | 30 | 11 | ["open", "fh.write", "str", "patch.object", "patch.object", "_release_pid_lock", "os.getpid", "os.path.exists", "open", "fh.read", "str"] | 0 | [] | The function (test_release_pid_lock_when_pid_does_not_match) defined within the public class called public.The function start at line 157 and ends at 186. It contains 15 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 11.0 f... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_release_pid_lock_when_lock_not_held | def test_release_pid_lock_when_lock_not_held(temp_pid_lock_file):"""Tests releasing a PID lock when the lock isn't being held. Confirm a warning is generated."""# No pid lock file in this caseassert not os.path.exists(temp_pid_lock_file)with patch.object(_pid_file_lock, "logger") as logger_mock:_release_pid_lock(temp_p... | 1 | 8 | 1 | 69 | 1 | 189 | 205 | 189 | temp_pid_lock_file | ['warning_message'] | None | {"Assign": 1, "Expr": 2, "With": 1} | 4 | 17 | 4 | ["os.path.exists", "patch.object", "_release_pid_lock", "os.path.exists"] | 0 | [] | The function (test_release_pid_lock_when_lock_not_held) defined within the public class called public.The function start at line 189 and ends at 205. 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 4.0 functions, a... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_release_pid_lock_cleans_up_stale_temp_file | def test_release_pid_lock_cleans_up_stale_temp_file(temp_pid_lock_file):"""Tests releasing a PID lock when the temp file for claiming the lock hung around."""# Create the internal implementation detail temporary file for claiming the PID locktemp_file_for_claiming = _pid_lock_temp_file_path(temp_pid_lock_file)with open... | 1 | 13 | 1 | 121 | 2 | 208 | 233 | 208 | temp_pid_lock_file | ['temp_file_for_claiming', 'warning_message'] | None | {"Assign": 2, "Expr": 4, "With": 3} | 13 | 26 | 13 | ["_pid_lock_temp_file_path", "open", "fh.write", "str", "os.getpid", "open", "fh.write", "str", "os.getpid", "patch.object", "_release_pid_lock", "os.path.exists", "os.path.exists"] | 0 | [] | The function (test_release_pid_lock_cleans_up_stale_temp_file) defined within the public class called public.The function start at line 208 and ends at 233. 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 13.0 fun... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | mock_api | def mock_api():"""Mock the API module."""with mock.patch("deadline.client.cli._groups.queue_group.api") as mock_api:# Mock the telemetry clientmock_api._telemetry.get_deadline_cloud_library_telemetry_client.return_value = (mock.MagicMock())yield mock_api | 1 | 6 | 0 | 32 | 0 | 19 | 26 | 19 | [] | None | {"Assign": 1, "Expr": 2, "With": 1} | 2 | 8 | 2 | ["mock.patch", "mock.MagicMock"] | 0 | [] | The function (mock_api) defined within the public class called public.The function start at line 19 and ends at 26. 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 functions, and It has 2.0 functions called in... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_queue_export_credentials_user_mode | def test_queue_export_credentials_user_mode(mock_api, fresh_deadline_config):"""Test exporting credentials in USER mode."""# Setupexpiration = datetime.datetime(2025, 4, 8, 20, 0, 46)mock_api.assume_queue_role_for_user.return_value = {"credentials": {"accessKeyId": "ASIAEXAMPLE","secretAccessKey": "wJalrXUtnFEMI/K7MDEN... | 1 | 35 | 2 | 207 | 5 | 29 | 71 | 29 | mock_api,fresh_deadline_config | ['output', 'expiration', 'telemetry_client', 'runner', 'result'] | None | {"Assign": 7, "Expr": 3} | 7 | 43 | 7 | ["datetime.datetime", "CliRunner", "runner.invoke", "json.loads", "expiration.isoformat", "mock_api.assume_queue_role_for_user.assert_called_once_with", "telemetry_client.record_event.assert_called_once"] | 0 | [] | The function (test_queue_export_credentials_user_mode) defined within the public class called public.The function start at line 29 and ends at 71. It contains 35 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [29.0] and does not return any value. It declares 7.0 functions, ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_queue_export_credentials_read_mode | def test_queue_export_credentials_read_mode(mock_api, fresh_deadline_config):"""Test exporting credentials in READ mode."""# Setupexpiration = datetime.datetime(2025, 4, 8, 20, 0, 46)mock_api.assume_queue_role_for_read.return_value = {"credentials": {"accessKeyId": "ASIAEXAMPLE","secretAccessKey": "wJalrXUtnFEMI/K7MDEN... | 1 | 27 | 2 | 147 | 4 | 74 | 107 | 74 | mock_api,fresh_deadline_config | ['runner', 'result', 'expiration', 'output'] | None | {"Assign": 5, "Expr": 2} | 6 | 34 | 6 | ["datetime.datetime", "CliRunner", "runner.invoke", "json.loads", "expiration.isoformat", "mock_api.assume_queue_role_for_read.assert_called_once_with"] | 0 | [] | The function (test_queue_export_credentials_read_mode) defined within the public class called public.The function start at line 74 and ends at 107. It contains 27 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [74.0] and does not return any value. It declares 6.0 functions,... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_queue_export_credentials_default_queue_id | def test_queue_export_credentials_default_queue_id(mock_api, fresh_deadline_config):"""Test exporting credentials using default farm ID and queue ID from config."""# Setupexpiration = datetime.datetime(2025, 4, 8, 20, 0, 46)mock_api.assume_queue_role_for_user.return_value = {"credentials": {"accessKeyId": "ASIAEXAMPLE"... | 1 | 18 | 2 | 116 | 3 | 110 | 134 | 110 | mock_api,fresh_deadline_config | ['runner', 'result', 'expiration'] | None | {"Assign": 4, "Expr": 4} | 6 | 25 | 6 | ["datetime.datetime", "config_file.set_setting", "config_file.set_setting", "CliRunner", "runner.invoke", "mock_api.assume_queue_role_for_user.assert_called_once_with"] | 0 | [] | The function (test_queue_export_credentials_default_queue_id) defined within the public class called public.The function start at line 110 and ends at 134. It contains 18 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [110.0] and does not return any value. It declares 6.0 f... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_queue_export_credentials_client_error | def test_queue_export_credentials_client_error(mock_api, fresh_deadline_config):"""Test error handling when API call fails."""# Setupmock_api.assume_queue_role_for_user.side_effect = ClientError({"Error": {"Code": "AccessDeniedException", "Message": "Access denied"}},"AssumeQueueRoleForUser",)# Executerunner = CliRunne... | 1 | 18 | 2 | 115 | 3 | 137 | 163 | 137 | mock_api,fresh_deadline_config | ['runner', 'result', 'telemetry_client'] | None | {"Assign": 5, "Expr": 2} | 4 | 27 | 4 | ["ClientError", "CliRunner", "runner.invoke", "telemetry_client.record_event.assert_called_once"] | 0 | [] | The function (test_queue_export_credentials_client_error) defined within the public class called public.The function start at line 137 and ends at 163. It contains 18 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [137.0] and does not return any value. It declares 4.0 funct... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_queue_export_credentials_auth_error | def test_queue_export_credentials_auth_error(mock_api, fresh_deadline_config):"""Test error handling when authentication fails."""# Setupmock_api.assume_queue_role_for_user.side_effect = ClientError({"Error": {"Code": "UnrecognizedClientException","Message": "The security token included in the request is invalid",}},"A... | 1 | 17 | 2 | 70 | 2 | 166 | 189 | 166 | mock_api,fresh_deadline_config | ['runner', 'result'] | None | {"Assign": 3, "Expr": 1} | 3 | 24 | 3 | ["ClientError", "CliRunner", "runner.invoke"] | 0 | [] | The function (test_queue_export_credentials_auth_error) defined within the public class called public.The function start at line 166 and ends at 189. It contains 17 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [166.0] and does not return any value. It declares 3.0 functio... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_config_settings_roundtrip | def test_config_settings_roundtrip(fresh_deadline_config, setting_name, default_value, alternate_value):"""Test that each setting we support has the right default and roundtrips changes"""assert config.get_setting(setting_name) == default_valueconfig.set_setting(setting_name, alternate_value)assert config.get_setting(s... | 1 | 6 | 4 | 38 | 0 | 32 | 38 | 32 | fresh_deadline_config,setting_name,default_value,alternate_value | [] | None | {"Expr": 2} | 4 | 7 | 4 | ["config.get_setting", "config.set_setting", "config.get_setting", "pytest.mark.parametrize"] | 0 | [] | The function (test_config_settings_roundtrip) defined within the public class called public.The function start at line 32 and ends at 38. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [32.0] and does not return any value. It declares 4.0 functions, and It ha... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_config_settings_hierarchy | def test_config_settings_hierarchy(fresh_deadline_config):"""Test that settings are stored hierarchically,aws profile -> farm id -> queue id"""# First set some settings that apply to the defaults, changing the# hierarchy from queue inwards.config.set_setting("settings.storage_profile_id", "storage-profile-for-farm-defa... | 1 | 17 | 1 | 137 | 0 | 41 | 75 | 41 | fresh_deadline_config | [] | None | {"Expr": 8} | 16 | 35 | 16 | ["config.set_setting", "config.set_setting", "config.set_setting", "config.set_setting", "config.get_setting", "config.get_setting", "config.get_setting", "config.clear_setting", "config.get_setting", "config.get_setting", "config.get_setting", "config.clear_setting", "config.get_setting", "config.get_setting", "config... | 0 | [] | The function (test_config_settings_hierarchy) defined within the public class called public.The function start at line 41 and ends at 75. 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 16.0 functions, and It has... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_config_get_setting_nonexistant | def test_config_get_setting_nonexistant(fresh_deadline_config):"""Test the error from get_setting when a setting doesn't exist."""# Setting name without the '.'with pytest.raises(DeadlineOperationError) as excinfo:config.get_setting("setting_name_bad_format")assert "is not valid" in str(excinfo.value)assert "setting_na... | 1 | 13 | 1 | 108 | 0 | 78 | 96 | 78 | fresh_deadline_config | [] | None | {"Expr": 4, "With": 3} | 12 | 19 | 12 | ["pytest.raises", "config.get_setting", "str", "str", "pytest.raises", "config.get_setting", "str", "str", "pytest.raises", "config.get_setting", "str", "str"] | 0 | [] | The function (test_config_get_setting_nonexistant) defined within the public class called public.The function start at line 78 and ends at 96. 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 12.0 functions, and I... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_config_set_setting_nonexistant | def test_config_set_setting_nonexistant(fresh_deadline_config):"""Test the error from set_setting when a setting doesn't exist."""# Setting name without the '.'with pytest.raises(DeadlineOperationError) as excinfo:config.set_setting("setting_name_bad_format", "value")assert "is not valid" in str(excinfo.value)assert "s... | 1 | 13 | 1 | 114 | 0 | 99 | 117 | 99 | fresh_deadline_config | [] | None | {"Expr": 4, "With": 3} | 12 | 19 | 12 | ["pytest.raises", "config.set_setting", "str", "str", "pytest.raises", "config.set_setting", "str", "str", "pytest.raises", "config.set_setting", "str", "str"] | 0 | [] | The function (test_config_set_setting_nonexistant) defined within the public class called public.The function start at line 99 and ends at 117. 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 12.0 functions, and ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_config_clear_setting_nonexistant | def test_config_clear_setting_nonexistant(fresh_deadline_config):"""Test the error from clear_setting when a setting doesn't exist."""# Setting name without the '.'with pytest.raises(DeadlineOperationError) as excinfo:config.clear_setting("setting_name_bad_format")assert "is not valid" in str(excinfo.value)assert "sett... | 1 | 13 | 1 | 108 | 0 | 120 | 138 | 120 | fresh_deadline_config | [] | None | {"Expr": 4, "With": 3} | 12 | 19 | 12 | ["pytest.raises", "config.clear_setting", "str", "str", "pytest.raises", "config.clear_setting", "str", "str", "pytest.raises", "config.clear_setting", "str", "str"] | 0 | [] | The function (test_config_clear_setting_nonexistant) defined within the public class called public.The function start at line 120 and ends at 138. 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 12.0 functions, an... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_config_file_env_var | def test_config_file_env_var(fresh_deadline_config):"""Test that setting the env var DEADLINE_CONFIG_FILE_PATH overrides the config path"""assert config_file.get_config_file_path() == Path(fresh_deadline_config).expanduser()alternate_deadline_config_file = fresh_deadline_config + "_alternative_file"# Set our config fil... | 3 | 29 | 1 | 227 | 1 | 142 | 187 | 142 | fresh_deadline_config | ['alternate_deadline_config_file'] | None | {"Assign": 3, "Expr": 4, "If": 1, "Try": 1, "With": 2} | 26 | 46 | 26 | ["config_file.get_config_file_path", "expanduser", "Path", "config.set_setting", "config.get_setting", "open", "f.read", "config_file.get_config_file_path", "expanduser", "Path", "config.get_setting", "config.set_setting", "config.get_setting", "open", "f.read", "config_file.get_config_file_path", "expanduser", "Path",... | 0 | [] | The function (test_config_file_env_var) defined within the public class called public.The function start at line 142 and ends at 187. It contains 29 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 26.0 functions, and It has 26.... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_get_best_profile_for_farm | def test_get_best_profile_for_farm(fresh_deadline_config):"""Test that it returns the exact farm + queue id match"""PROFILE_SETTINGS = [("Profile1", "farm-1", "queue-1"),("Profile2", "farm-2", "queue-2"),("Profile3", "farm-1", "queue-3"),("Profile4", "farm-3", "queue-4"),("Profile5", "farm-3", "queue-5"),("Profile6", "... | 5 | 42 | 1 | 299 | 2 | 190 | 248 | 190 | fresh_deadline_config | ['PROFILE_SETTINGS', 'MOCK_PROFILE_VALUE'] | None | {"Assign": 3, "Expr": 5, "For": 2, "If": 1, "With": 1} | 19 | 59 | 19 | ["config.set_setting", "config.set_setting", "config.set_setting", "patch.object", "boto3_session", "config.get_best_profile_for_farm", "config.get_setting", "config.get_best_profile_for_farm", "config.get_best_profile_for_farm", "config.get_best_profile_for_farm", "config.get_best_profile_for_farm", "config.get_best_p... | 0 | [] | The function (test_get_best_profile_for_farm) defined within the public class called public.The function start at line 190 and ends at 248. It contains 42 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value. It declares 19.0 functions, and It h... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_str2bool | def test_str2bool():assert config_file.str2bool("on") is Trueassert config_file.str2bool("true") is Trueassert config_file.str2bool("tRuE") is Trueassert config_file.str2bool("1") is Trueassert config_file.str2bool("off") is Falseassert config_file.str2bool("false") is Falseassert config_file.str2bool("FaLsE") is False... | 1 | 13 | 0 | 104 | 0 | 251 | 263 | 251 | [] | None | {"Expr": 2, "With": 2} | 12 | 13 | 12 | ["config_file.str2bool", "config_file.str2bool", "config_file.str2bool", "config_file.str2bool", "config_file.str2bool", "config_file.str2bool", "config_file.str2bool", "config_file.str2bool", "pytest.raises", "config_file.str2bool", "pytest.raises", "config_file.str2bool"] | 0 | [] | The function (test_str2bool) defined within the public class called public.The function start at line 251 and ends at 263. 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 12.0 functions, and It has 12.0 functions... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_default_log_level | def test_default_log_level(fresh_deadline_config):# To avoid excessive logging, the log level should not be DEBUG by default.assert config.get_setting("settings.log_level") != "DEBUG"# Verify the default log level exists and is less verbose than DEBUGassert config.get_setting("settings.log_level") == "WARNING" | 1 | 3 | 1 | 23 | 0 | 266 | 270 | 266 | fresh_deadline_config | [] | None | {} | 2 | 5 | 2 | ["config.get_setting", "config.get_setting"] | 0 | [] | The function (test_default_log_level) defined within the public class called public.The function start at line 266 and ends at 270. 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 fun... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_reset_directory_permissions_windows | def test_reset_directory_permissions_windows() -> None:"""Asserts the _reset_directory_permissions_windows configures the providedfolder with access only to the active user, the domain admin, and SYSTEM."""# GIVENimport ntsecurityconimport win32securitypath = Path(tempfile.gettempdir())system_sid = win32security.Conver... | 3 | 22 | 0 | 176 | 6 | 277 | 308 | 277 | ['admin_sid', 'sids', 'dacl', 'sd', 'path', 'system_sid'] | None | {"Assign": 8, "Expr": 3, "For": 1, "Try": 1} | 19 | 32 | 19 | ["Path", "tempfile.gettempdir", "win32security.ConvertStringSidToSid", "win32security.ConvertStringSidToSid", "win32security.LookupAccountName", "getpass.getuser", "config_file._reset_directory_permissions_windows", "win32security.GetFileSecurity", "str", "path.resolve", "sd.GetSecurityDescriptorDacl", "dacl.GetAceCoun... | 0 | [] | The function (test_reset_directory_permissions_windows) defined within the public class called public.The function start at line 277 and ends at 308. It contains 22 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 19.0 functions,... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_write_config_directory_permission_windows | def test_write_config_directory_permission_windows(mock_get_config_file_path,):"""Tests that the config directory permissions are not modified when writing to the config file"""# GIVENpath = Path(tempfile.gettempdir())config_path = path / "config"mock_get_config_file_path.return_value = config_path# -------------------... | 3 | 26 | 1 | 194 | 8 | 316 | 358 | 316 | mock_get_config_file_path | ['new_dacl_aces', 'dacl', 'config_path', 'sd', 'new_dacl', 'guest_sid', 'path', 'dacl_aces'] | None | {"Assign": 9, "Expr": 5} | 27 | 43 | 27 | ["Path", "tempfile.gettempdir", "win32security.GetFileSecurity", "str", "path.resolve", "win32security.ConvertStringSidToSid", "sd.GetSecurityDescriptorDacl", "dacl.AddAccessAllowedAceEx", "sd.SetSecurityDescriptorDacl", "win32security.SetFileSecurity", "str", "path.resolve", "config_file.write_config", "MagicMock", "G... | 0 | [] | The function (test_write_config_directory_permission_windows) defined within the public class called public.The function start at line 316 and ends at 358. It contains 26 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 27.0 func... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_posix_config_file_permissions | def test_posix_config_file_permissions(fresh_deadline_config) -> None:config_file_path = config_file.get_config_file_path()config_file_path.chmod(0o777)config_file.set_setting("defaults.aws_profile_name", "goodguyprofile")assert config_file_path.stat().st_mode & 0o777 == 0o600 | 1 | 5 | 1 | 40 | 1 | 365 | 371 | 365 | fresh_deadline_config | ['config_file_path'] | None | {"Assign": 1, "Expr": 2} | 6 | 7 | 6 | ["config_file.get_config_file_path", "config_file_path.chmod", "config_file.set_setting", "config_file_path.stat", "pytest.mark.skipif", "platform.system"] | 0 | [] | The function (test_posix_config_file_permissions) defined within the public class called public.The function start at line 365 and ends at 371. 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 6.0 functions, and It... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _get_inclusive_range | def _get_inclusive_range(start, end, step):if end is None and step is None:return [start]elif (end is Noneor start is Noneor start < endand step is not Noneand step < 0or start > endand step is not Noneand step > 0):return Noneif step is None:step = 1 if end > start else -1return list(range(start, end + (1 if step > 0 ... | 14 | 17 | 3 | 99 | 1 | 44 | 60 | 44 | start,end,step | ['step'] | Returns | {"Assign": 1, "If": 3, "Return": 3} | 2 | 17 | 2 | ["list", "range"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.job_bundle.test_adaptors_py.test_parse_frame_range"] | The function (_get_inclusive_range) defined within the public class called public.The function start at line 44 and ends at 60. It contains 17 lines of code and it has a cyclomatic complexity of 14. It takes 3 parameters, represented as [44.0], and this function return a value. It declares 2.0 functions, It has 2.0 fun... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_parse_frame_range | def test_parse_frame_range(frame_string: str, result: list[int]):if result is None:with pytest.raises(ValueError):parse_frame_range(frame_string)else:assert parse_frame_range(frame_string) == result | 2 | 6 | 2 | 40 | 0 | 75 | 80 | 75 | frame_string,result | [] | None | {"Expr": 1, "If": 1, "With": 1} | 7 | 6 | 7 | ["pytest.raises", "parse_frame_range", "parse_frame_range", "pytest.mark.parametrize", "str", "str", "_get_inclusive_range"] | 0 | [] | The function (test_parse_frame_range) defined within the public class called public.The function start at line 75 and ends at 80. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [75.0] and does not return any value. It declares 7.0 functions, and It has 7.0 fu... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_read_job_bundle_parameters | def test_read_job_bundle_parameters(template_data,parameter_values,expected_result,fresh_deadline_config,temp_job_bundle_dir,):"""Tests that the read_job_bundle_parameters function loads the"""# Write the template to the job bundlewith open(os.path.join(temp_job_bundle_dir, "template.yaml"),"w",encoding="utf8",) as f:f... | 1 | 26 | 5 | 121 | 2 | 140 | 177 | 140 | template_data,parameter_values,expected_result,fresh_deadline_config,temp_job_bundle_dir | ['result', 'directory_picker_2_value'] | None | {"Assign": 2, "Expr": 3, "With": 2} | 14 | 38 | 14 | ["open", "os.path.join", "f.write", "open", "os.path.join", "f.write", "read_job_bundle_parameters", "json.dumps", "os.path.normpath", "os.path.join", "yaml.safe_load", "expected_result.format", "pytest.mark.parametrize", "pytest.param"] | 0 | [] | The function (test_read_job_bundle_parameters) defined within the public class called public.The function start at line 140 and ends at 177. It contains 26 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [140.0] and does not return any value. It declares 14.0 functions, and ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.