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 | enter_job_hist_dir_input | def enter_job_hist_dir_input(job_history_directory_path: str):# clear job history directory input fieldsquish.waitForObject(workstation_config_locators.job_hist_dir_input)job_hist_text_input = squish.findObject(workstation_config_locators.job_hist_dir_input)job_hist_text_input.clear()# enter custom file path in job his... | 1 | 6 | 1 | 46 | 1 | 40 | 47 | 40 | job_history_directory_path | ['job_hist_text_input'] | None | {"Assign": 1, "Expr": 4} | 5 | 8 | 5 | ["squish.waitForObject", "squish.findObject", "job_hist_text_input.clear", "squish.type", "test.log"] | 0 | [] | The function (enter_job_hist_dir_input) defined within the public class called public.The function start at line 40 and ends at 47. 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 5.0 functions, and It has 5.0 fun... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | verify_job_hist_dir_text_input | def verify_job_hist_dir_text_input(job_history_directory_path: str):# verify job history directory text input displays correct file path based on OS platform being testedif platform.system() == "Linux":test.log("Detected test running on Linux OS")test.compare(str(squish.waitForObjectExists(workstation_config_locators.j... | 4 | 34 | 1 | 121 | 0 | 50 | 84 | 50 | job_history_directory_path | [] | None | {"Expr": 6, "If": 3} | 15 | 35 | 15 | ["platform.system", "test.log", "test.compare", "str", "squish.waitForObjectExists", "platform.system", "test.log", "test.compare", "str", "squish.waitForObjectExists", "platform.system", "test.log", "test.compare", "str", "squish.waitForObjectExists"] | 0 | [] | The function (verify_job_hist_dir_text_input) defined within the public class called public.The function start at line 50 and ends at 84. It contains 34 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 15.0 functions, and It has... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | check_directory_exists | def check_directory_exists(job_history_directory_path: str):return os.path.exists(job_history_directory_path) and os.path.isdir(job_history_directory_path) | 2 | 2 | 1 | 25 | 0 | 87 | 88 | 87 | job_history_directory_path | [] | Returns | {"Return": 1} | 2 | 2 | 2 | ["os.path.exists", "os.path.isdir"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.squish.suite_deadline_gui.shared.scripts.jobhistory_dir_helpers_py.delete_directory_if_exists", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_... | The function (check_directory_exists) defined within the public class called public.The function start at line 87 and ends at 88. It contains 2 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 2.0 functions, It has 2.0 functi... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | verify_directory_exists | def verify_directory_exists(job_history_directory_path: str):if platform.system() == "Linux":test.log("Detected test running on Linux OS")# verify job history directory exists on user's systemif check_directory_exists(os.path.expanduser(job_history_directory_path)):test.passes(f"Job history directory '{job_history_dire... | 7 | 25 | 1 | 143 | 0 | 91 | 118 | 91 | job_history_directory_path | [] | None | {"Expr": 9, "If": 6} | 19 | 28 | 19 | ["platform.system", "test.log", "check_directory_exists", "os.path.expanduser", "test.passes", "test.fail", "platform.system", "test.log", "check_directory_exists", "os.path.normcase", "os.path.expanduser", "test.passes", "test.fail", "platform.system", "test.log", "check_directory_exists", "os.path.expanduser", "test.... | 0 | [] | The function (verify_directory_exists) defined within the public class called public.The function start at line 91 and ends at 118. It contains 25 lines of code and it has a cyclomatic complexity of 7. The function does not take any parameters and does not return any value. It declares 19.0 functions, and It has 19.0 ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | delete_directory_if_exists | def delete_directory_if_exists(job_history_directory_path: str):if platform.system() == "Linux":test.log("Detected test running on Linux OS")# if folder exists, delete folderif check_directory_exists(os.path.expanduser(job_history_directory_path)):shutil.rmtree(os.path.expanduser(job_history_directory_path))test.log("D... | 7 | 22 | 1 | 186 | 0 | 121 | 145 | 121 | job_history_directory_path | [] | None | {"Expr": 12, "If": 6} | 26 | 25 | 26 | ["platform.system", "test.log", "check_directory_exists", "os.path.expanduser", "shutil.rmtree", "os.path.expanduser", "test.log", "test.log", "platform.system", "test.log", "check_directory_exists", "os.path.normcase", "os.path.expanduser", "shutil.rmtree", "os.path.normcase", "os.path.expanduser", "test.log", "test.l... | 0 | [] | The function (delete_directory_if_exists) defined within the public class called public.The function start at line 121 and ends at 145. It contains 22 lines of code and it has a cyclomatic complexity of 7. The function does not take any parameters and does not return any value. It declares 26.0 functions, and It has 2... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | check_and_close_refresh_error_dialogues | def check_and_close_refresh_error_dialogues():"""When launching deadline config gui/settings dialogue, up to three refresh error dialogues can appear, and they appear in any order.These dialogues must be closed prior to being able to select the correct profile for authentication, or logging in.A scenario in which these... | 7 | 28 | 0 | 140 | 2 | 10 | 43 | 10 | ['timeout', 'dialogue_names'] | None | {"Assign": 3, "Expr": 5, "For": 2, "If": 2, "Try": 1} | 8 | 34 | 8 | ["range", "dialogue_names.items", "squish.waitForObject", "squish.mouseClick", "test.log", "test.log", "all", "dialogue_names.values"] | 0 | [] | The function (check_and_close_refresh_error_dialogues) defined within the public class called public.The function start at line 10 and ends at 43. It contains 28 lines of code and it has a cyclomatic complexity of 7. The function does not take any parameters and does not return any value. It declares 8.0 functions, and... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | set_aws_profile_name_and_verify_auth | def set_aws_profile_name_and_verify_auth(profile_name: str):# open AWS profile drop down menusquish.mouseClick(squish.waitForObjectExists(workstation_config_locators.globalsettings_awsprofile_dropdown),)test.log("Opened AWS profile drop down menu.")test.compare(squish.waitForObjectExists(workstation_config_locators.pro... | 1 | 53 | 1 | 202 | 0 | 46 | 101 | 46 | profile_name | [] | None | {"Expr": 12} | 25 | 56 | 25 | ["squish.mouseClick", "squish.waitForObjectExists", "test.log", "test.compare", "squish.waitForObjectExists", "workstation_config_locators.profile_name_locator", "squish.mouseClick", "workstation_config_locators.profile_name_locator", "test.log", "test.log", "test.compare", "squish.waitForObjectExists", "test.compare",... | 0 | [] | The function (set_aws_profile_name_and_verify_auth) defined within the public class called public.The function start at line 46 and ends at 101. It contains 53 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 25.0 functions, and ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | launch_deadline_config_gui | def launch_deadline_config_gui():squish.startApplication("deadline config gui")test.log("Launched Deadline Workstation Config GUI.")test.log("Sleep for " + str(snooze_timeout) + " second(s) to allow authentication to fully load.")squish.snooze(snooze_timeout)test.compare(squish.waitForObjectExists(workstation_config_lo... | 1 | 12 | 0 | 55 | 0 | 15 | 26 | 15 | [] | None | {"Expr": 5} | 7 | 12 | 7 | ["squish.startApplication", "test.log", "test.log", "str", "squish.snooze", "test.compare", "squish.waitForObjectExists"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.squish.suite_deadline_gui.shared.scripts.workstation_config_helpers_py.detect_platform_and_launch_deadline_config"] | The function (launch_deadline_config_gui) defined within the public class called public.The function start at line 15 and ends at 26. It contains 12 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 7.0 functions, It has 7.0 funct... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | launch_deadline_config_gui_windows_only | def launch_deadline_config_gui_windows_only():squish.startApplication(f"python {config.windows_deadline_path_envvar} config gui")test.log("Launched Deadline Workstation Config GUI on Windows.")test.log("Sleep for " + str(snooze_timeout) + " second(s) to allow authentication to fully load.")squish.snooze(snooze_timeout)... | 1 | 12 | 0 | 56 | 0 | 30 | 41 | 30 | [] | None | {"Expr": 5} | 7 | 12 | 7 | ["squish.startApplication", "test.log", "test.log", "str", "squish.snooze", "test.compare", "squish.waitForObjectExists"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.squish.suite_deadline_gui.shared.scripts.workstation_config_helpers_py.detect_platform_and_launch_deadline_config"] | The function (launch_deadline_config_gui_windows_only) defined within the public class called public.The function start at line 30 and ends at 41. It contains 12 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 7.0 functions, It ... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | detect_platform_and_launch_deadline_config | def detect_platform_and_launch_deadline_config():if platform.system() == "Linux":test.log("Detected test running on Linux OS")test.log("Launching Deadline Workstation Config on Linux")launch_deadline_config_gui()elif platform.system() == "Windows":test.log("Detected test running on Windows OS")test.log("Launching Deadl... | 4 | 15 | 0 | 84 | 0 | 45 | 59 | 45 | [] | None | {"Expr": 10, "If": 3} | 13 | 15 | 13 | ["platform.system", "test.log", "test.log", "launch_deadline_config_gui", "platform.system", "test.log", "test.log", "launch_deadline_config_gui_windows_only", "platform.system", "test.log", "test.log", "launch_deadline_config_gui", "test.log"] | 0 | [] | The function (detect_platform_and_launch_deadline_config) defined within the public class called public.The function start at line 45 and ends at 59. It contains 15 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 13.0 functions,... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | close_deadline_config_gui | def close_deadline_config_gui():test.log("Hitting `OK` button to close Deadline Settings.")# hit 'OK' button to close Deadline Config GUIsquish.clickButton(squish.waitForObject(workstation_config_locators.deadlinedialog_ok_button)) | 1 | 3 | 0 | 23 | 0 | 62 | 65 | 62 | [] | None | {"Expr": 2} | 3 | 4 | 3 | ["test.log", "squish.clickButton", "squish.waitForObject"] | 0 | [] | The function (close_deadline_config_gui) defined within the public class called public.The function start at line 62 and ends at 65. 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 3.0 functions, and It has 3.0 fu... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | open_settings_dialogue | def open_settings_dialogue():test.log("Hitting `Settings` button to open Deadline Settings dialogue.")# click on Settings button to open Deadline Settings dialogue from Submittersquish.clickButton(squish.waitForObject(gui_submitter_locators.settings_button))test.log("Opened Deadline Workstation Settings dialogue.")# ve... | 1 | 9 | 0 | 49 | 0 | 68 | 78 | 68 | [] | None | {"Expr": 4} | 6 | 11 | 6 | ["test.log", "squish.clickButton", "squish.waitForObject", "test.log", "test.compare", "squish.waitForObjectExists"] | 0 | [] | The function (open_settings_dialogue) defined within the public class called public.The function start at line 68 and ends at 78. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It has 6.0 funct... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | hit_apply_button | def hit_apply_button():test.log("Hitting `Apply` button to apply selected settings.")# hit 'Apply' buttonsquish.clickButton(squish.waitForObject(workstation_config_locators.deadlinedialog_apply_button))test.log("Settings have been applied.") | 1 | 6 | 0 | 29 | 0 | 81 | 87 | 81 | [] | None | {"Expr": 3} | 4 | 7 | 4 | ["test.log", "squish.clickButton", "squish.waitForObject", "test.log"] | 0 | [] | The function (hit_apply_button) defined within the public class called public.The function start at line 81 and ends at 87. 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 4.0 functions, and It has 4.0 functions c... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | set_farm_name | def set_farm_name(farm_name: str):# open Default farm drop down menusquish.mouseClick(squish.waitForObject(workstation_config_locators.profilesettings_defaultfarm_dropdown))test.log("Opened farm name drop down menu.")test.compare(squish.waitForObjectExists(workstation_config_locators.farm_name_locator(farm_name)).text,... | 1 | 16 | 1 | 70 | 0 | 90 | 107 | 90 | farm_name | [] | None | {"Expr": 5} | 9 | 18 | 9 | ["squish.mouseClick", "squish.waitForObject", "test.log", "test.compare", "squish.waitForObjectExists", "workstation_config_locators.farm_name_locator", "squish.mouseClick", "squish.waitForObjectItem", "test.log"] | 0 | [] | The function (set_farm_name) defined within the public class called public.The function start at line 90 and ends at 107. It contains 16 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 9.0 functions, and It has 9.0 functions ca... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | set_queue_name | def set_queue_name(queue_name: str):# open Default queue drop down menusquish.mouseClick(squish.waitForObject(workstation_config_locators.farmsettings_defaultqueue_dropdown))test.log("Opened queue name drop down menu.")test.compare(squish.waitForObjectExists(workstation_config_locators.queue_name_locator(queue_name)).t... | 1 | 16 | 1 | 70 | 0 | 110 | 127 | 110 | queue_name | [] | None | {"Expr": 5} | 9 | 18 | 9 | ["squish.mouseClick", "squish.waitForObject", "test.log", "test.compare", "squish.waitForObjectExists", "workstation_config_locators.queue_name_locator", "squish.mouseClick", "squish.waitForObjectItem", "test.log"] | 0 | [] | The function (set_queue_name) defined within the public class called public.The function start at line 110 and ends at 127. It contains 16 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 9.0 functions, and It has 9.0 functions ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | set_and_verify_os_storage_profile | def set_and_verify_os_storage_profile(linux_storage_profile: str, windows_storage_profile: str, macos_storage_profile: str):# open Default storage profile drop down menusquish.mouseClick(squish.waitForObject(workstation_config_locators.farmsettings_defaultstorageprofile_dropdown))test.log("Opened storage profile drop d... | 4 | 82 | 3 | 271 | 0 | 130 | 219 | 130 | linux_storage_profile,windows_storage_profile,macos_storage_profile | [] | None | {"Expr": 15, "If": 3} | 34 | 90 | 34 | ["squish.mouseClick", "squish.waitForObject", "test.log", "platform.system", "test.log", "test.compare", "squish.waitForObjectExists", "workstation_config_locators.storage_profile_locator", "squish.mouseClick", "squish.waitForObjectItem", "test.compare", "str", "squish.waitForObjectExists", "platform.system", "test.log... | 0 | [] | The function (set_and_verify_os_storage_profile) defined within the public class called public.The function start at line 130 and ends at 219. It contains 82 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [130.0] and does not return any value. It declares 34.0 functions, an... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | set_job_attachments_filesystem_options | def set_job_attachments_filesystem_options(job_attachments: str):# open Job attachments filesystem options drop down menusquish.mouseClick(squish.waitForObject(workstation_config_locators.farmsettings_jobattachmentsoptions_dropdown))test.log("Opened job attachments filesystem options drop down menu.")# select Job attac... | 1 | 13 | 1 | 47 | 0 | 222 | 236 | 222 | job_attachments | [] | None | {"Expr": 4} | 6 | 15 | 6 | ["squish.mouseClick", "squish.waitForObject", "test.log", "squish.mouseClick", "squish.waitForObjectItem", "test.log"] | 0 | [] | The function (set_job_attachments_filesystem_options) defined within the public class called public.The function start at line 222 and ends at 236. 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 6.0 functions, an... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | set_conflict_resolution_option | def set_conflict_resolution_option(conflict_res_option: str):# open Conflict resolution option drop down menusquish.mouseClick(squish.waitForObject(workstation_config_locators.conflictresolution_option_dropdown),)test.log("Opened conflict resolution option drop down menu.")# select Conflict resolution optionsquish.mous... | 1 | 11 | 1 | 49 | 0 | 239 | 251 | 239 | conflict_res_option | [] | None | {"Expr": 4} | 6 | 13 | 6 | ["squish.mouseClick", "squish.waitForObject", "test.log", "squish.mouseClick", "squish.waitForObjectItem", "test.log"] | 0 | [] | The function (set_conflict_resolution_option) defined within the public class called public.The function start at line 239 and ends at 251. It contains 11 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It ha... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | set_current_logging_level | def set_current_logging_level(logging_level: str):# open Current logging level drop down menusquish.mouseClick(squish.waitForObject(workstation_config_locators.currentlogging_level_dropdown),)test.log("Opened current logging level drop down menu.")# select Current logging levelsquish.mouseClick(squish.waitForObjectItem... | 1 | 11 | 1 | 49 | 0 | 254 | 266 | 254 | logging_level | [] | None | {"Expr": 4} | 6 | 13 | 6 | ["squish.mouseClick", "squish.waitForObject", "test.log", "squish.mouseClick", "squish.waitForObjectItem", "test.log"] | 0 | [] | The function (set_current_logging_level) defined within the public class called public.The function start at line 254 and ends at 266. It contains 11 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It has 6.0... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | profile_name_locator | def profile_name_locator(profile_name):return {"container": globalsettings_awsprofile_dropdown,"text": profile_name,"type": "QModelIndex",} | 1 | 6 | 1 | 20 | 0 | 222 | 227 | 222 | profile_name | [] | Returns | {"Return": 1} | 0 | 6 | 0 | [] | 0 | [] | The function (profile_name_locator) defined within the public class called public.The function start at line 222 and ends at 227. 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.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | farm_name_locator | def farm_name_locator(farm_name):return {"container": profilesettings_defaultfarm_dropdown,"text": farm_name,"type": "QModelIndex",} | 1 | 6 | 1 | 20 | 0 | 230 | 235 | 230 | farm_name | [] | Returns | {"Return": 1} | 0 | 6 | 0 | [] | 0 | [] | The function (farm_name_locator) defined within the public class called public.The function start at line 230 and ends at 235. 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.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | queue_name_locator | def queue_name_locator(queue_name):return {"container": farmsettings_defaultqueue_dropdown,"text": queue_name,"type": "QModelIndex",} | 1 | 6 | 1 | 20 | 0 | 238 | 243 | 238 | queue_name | [] | Returns | {"Return": 1} | 0 | 6 | 0 | [] | 0 | [] | The function (queue_name_locator) defined within the public class called public.The function start at line 238 and ends at 243. 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.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | storage_profile_locator | def storage_profile_locator(storage_profile):return {"container": farmsettings_defaultstorageprofile_dropdown,"text": storage_profile,"type": "QModelIndex",} | 1 | 6 | 1 | 20 | 0 | 246 | 251 | 246 | storage_profile | [] | Returns | {"Return": 1} | 0 | 6 | 0 | [] | 0 | [] | The function (storage_profile_locator) defined within the public class called public.The function start at line 246 and ends at 251. 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.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | init | def init():# launch Choose Job Bundle GUI Submitter based on OS platform being testedchoose_jobbundledir_helpers.detect_platform_and_launch_jobbundle_guisubmitter()# verify Choose job bundle directory is opentest.compare(str(squish.waitForObjectExists(choose_jobbundledir_locators.choose_job_bundle_dir).windowTitle),"Ch... | 1 | 16 | 0 | 52 | 0 | 14 | 31 | 14 | [] | None | {"Expr": 3} | 6 | 18 | 6 | ["choose_jobbundledir_helpers.detect_platform_and_launch_jobbundle_guisubmitter", "test.compare", "str", "squish.waitForObjectExists", "test.compare", "squish.waitForObjectExists"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.59624560_openwpm_openwpm.openwpm.storage.cloud_storage.gcp_storage_py.GcsStructuredProvider.init", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.59624560_openwpm_openwpm.openwpm.storage.cloud_storage.s3_storage_py.S... | The function (init) defined within the public class called public.The function start at line 14 and ends at 31. It contains 16 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, It has 6.0 functions called inside whi... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | main | def main():# select Simple UI with Job Attachments (simple_ui_with_ja) job bundlechoose_jobbundledir_helpers.select_jobbundle(config.simple_ui_with_ja)# verify GUI Submitter dialogue openstest.compare(str(squish.waitForObjectExists(gui_submitter_locators.aws_submitter_dialogue).windowTitle),"Submit to AWS Deadline Clou... | 1 | 27 | 0 | 104 | 0 | 34 | 66 | 34 | [] | None | {"Expr": 10} | 13 | 33 | 13 | ["choose_jobbundledir_helpers.select_jobbundle", "test.compare", "str", "squish.waitForObjectExists", "test.compare", "squish.waitForObjectExists", "test.log", "gui_submitter_helpers.verify_shared_job_settings", "test.log", "choose_jobbundledir_helpers.load_different_job_bundle", "choose_jobbundledir_helpers.select_job... | 134 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.main_py.init", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.tests.test_main_py.Test_Main.test_if_version_prints_version_and_stops", "... | The function (main) defined within the public class called public.The function start at line 34 and ends at 66. It contains 27 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, It has 13.0 functions called inside w... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | cleanup | def cleanup():test.log("Closing AWS Submitter dialogue by sending QCloseEvent to 'x' button.")squish.sendEvent("QCloseEvent", squish.waitForObject(gui_submitter_locators.aws_submitter_dialogue)) | 1 | 5 | 0 | 25 | 0 | 69 | 73 | 69 | [] | None | {"Expr": 2} | 3 | 5 | 3 | ["test.log", "squish.sendEvent", "squish.waitForObject"] | 45 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.attach.attach_py.attach_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.attach.attach_py.sig_pro... | The function (cleanup) defined within the public class called public.The function start at line 69 and ends at 73. 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, It has 3.0 functions called inside w... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | init | def init():# launch Deadline Workstation Config dialog based on OS platform being testedworkstation_config_helpers.detect_platform_and_launch_deadline_config()# clear and reset job history directory text inputjobhistory_dir_helpers.enter_job_hist_dir_input(config.default_job_hist_dir)# verify text input displays correc... | 1 | 14 | 0 | 69 | 0 | 13 | 32 | 13 | [] | None | {"Expr": 7} | 8 | 20 | 8 | ["workstation_config_helpers.detect_platform_and_launch_deadline_config", "jobhistory_dir_helpers.enter_job_hist_dir_input", "jobhistory_dir_helpers.verify_job_hist_dir_text_input", "jobhistory_dir_helpers.delete_directory_if_exists", "test.log", "loginout_helpers.set_aws_profile_name_and_verify_auth", "test.compare", ... | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.59624560_openwpm_openwpm.openwpm.storage.cloud_storage.gcp_storage_py.GcsStructuredProvider.init", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.59624560_openwpm_openwpm.openwpm.storage.cloud_storage.s3_storage_py.S... | The function (init) defined within the public class called public.The function start at line 13 and ends at 32. It contains 14 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, It has 8.0 functions called inside whi... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | main | def main():# enter custom job history directory file pathjobhistory_dir_helpers.enter_job_hist_dir_input(config.custom_job_hist_dir)# open job history directory to set custom path and to create new directoryjobhistory_dir_helpers.open_job_hist_directory()# verify text input displays correct custom job history directory... | 1 | 89 | 0 | 310 | 0 | 35 | 142 | 35 | [] | None | {"Expr": 20} | 36 | 108 | 36 | ["jobhistory_dir_helpers.enter_job_hist_dir_input", "jobhistory_dir_helpers.open_job_hist_directory", "jobhistory_dir_helpers.verify_job_hist_dir_text_input", "jobhistory_dir_helpers.verify_directory_exists", "workstation_config_helpers.set_farm_name", "test.compare", "str", "squish.waitForObjectExists", "workstation_c... | 134 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.main_py.init", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18106662_pdreker_fritz_exporter.tests.test_main_py.Test_Main.test_if_version_prints_version_and_stops", "... | The function (main) defined within the public class called public.The function start at line 35 and ends at 142. It contains 89 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 36.0 functions, It has 36.0 functions called inside ... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | cleanup | def cleanup():# reset aws profile name to `(default)`loginout_helpers.set_aws_profile_name_and_verify_auth(config.profile_name)test.log("Reset aws profile name to `(default)` for test cleanup.")# reset job history directory settingjobhistory_dir_helpers.enter_job_hist_dir_input(config.default_job_hist_dir)# verify text... | 1 | 8 | 0 | 53 | 0 | 145 | 157 | 145 | [] | None | {"Expr": 7} | 7 | 13 | 7 | ["loginout_helpers.set_aws_profile_name_and_verify_auth", "test.log", "jobhistory_dir_helpers.enter_job_hist_dir_input", "jobhistory_dir_helpers.verify_job_hist_dir_text_input", "jobhistory_dir_helpers.delete_directory_if_exists", "test.log", "workstation_config_helpers.close_deadline_config_gui"] | 45 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.attach.attach_py.attach_base.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3617659_autotest_autotest_docker.subtests.docker_cli.attach.attach_py.sig_pro... | The function (cleanup) defined within the public class called public.The function start at line 145 and ends at 157. 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 7.0 functions, It has 7.0 functions called inside... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | fresh_deadline_config | def fresh_deadline_config():"""Fixture to start with a blank AWS Deadline Cloud config file."""# Clear the session cache. Importing the cache invalidator at runtime is necessary# to make sure the import order doesn't bypass moto mocking in other areas.from deadline.client.api._session import invalidate_boto3_session_ca... | 2 | 14 | 0 | 95 | 3 | 16 | 46 | 16 | ['temp_dir_path', 'temp_file_path', 'temp_dir'] | None | {"Assign": 3, "Expr": 6, "Try": 1, "With": 2} | 11 | 31 | 11 | ["invalidate_boto3_session_cache", "tempfile.TemporaryDirectory", "Path", "open", "temp_file.write", "patch.object", "str", "config_file.set_setting", "str", "temp_dir.cleanup", "pytest.fixture"] | 0 | [] | The function (fresh_deadline_config) defined within the public class called public.The function start at line 16 and ends at 46. It contains 14 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 11.0 functions, and It has 11.0 fun... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | aws_config | def aws_config(monkeypatch):"""Fixture to set the AWS_CONFIG_FILE environment variable to a temporary file.This fixture sanitizes the environment, otherwise it's easy to write a test that only works whena AWS config file exists(even if it isn't used) that then fails on machines where no such config file existsThis fixt... | 2 | 12 | 1 | 78 | 3 | 50 | 71 | 50 | monkeypatch | ['temp_dir_path', 'temp_file_path', 'temp_dir'] | None | {"Assign": 3, "Expr": 7, "Try": 1} | 9 | 22 | 9 | ["tempfile.TemporaryDirectory", "Path", "monkeypatch.setenv", "str", "monkeypatch.delenv", "monkeypatch.delenv", "temp_dir.cleanup", "monkeypatch.delenv", "pytest.fixture"] | 0 | [] | The function (aws_config) defined within the public class called public.The function start at line 50 and ends at 71. It contains 12 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 9.0 functions, and It has 9.0 functions called... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | is_windows_non_admin | def is_windows_non_admin():return sys.platform == "win32" and getpass.getuser() != "Administrator" | 2 | 2 | 0 | 18 | 0 | 74 | 75 | 74 | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["getpass.getuser"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.integ.deadline_job_attachments.test_job_attachments_py.test_sync_outputs_with_symlink", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.te... | The function (is_windows_non_admin) defined within the public class called public.The function start at line 74 and ends at 75. It contains 2 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function c... | |
aws-deadline_deadline-cloud | FileMissingCopyRight | public | 0 | 1 | __init__ | def __init__(self, message, filepath):super().__init__(message)self.filepath = filepath | 1 | 3 | 3 | 22 | 0 | 16 | 18 | 16 | self,message,filepath | [] | None | {"Assign": 1, "Expr": 1} | 2 | 3 | 2 | ["__init__", "super"] | 4,993 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.logging_py.LoggerHandler.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.schedule_... | The function (__init__) defined within the public class called FileMissingCopyRight, that inherit another class.The function start at line 16 and ends at 18. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [16.0] and does not return any value. It declares 2.0 f... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _check_file | def _check_file(filename: Path) -> None:with open(filename, encoding="utf8") as infile:lines_read = 0for line in infile:if _copyright_header_re.search(line):return# successlines_read += 1if lines_read > 10:raise FileMissingCopyRight(f"Could not find a valid Amazon.com copyright header in the top of {filename}."" Please... | 4 | 19 | 1 | 74 | 1 | 21 | 40 | 21 | filename | ['lines_read'] | None | {"Assign": 1, "AugAssign": 1, "For": 1, "If": 2, "Return": 1, "With": 1} | 6 | 20 | 6 | ["open", "_copyright_header_re.search", "FileMissingCopyRight", "Path", "FileMissingCopyRight", "Path"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.test_copyright_headers_py.test_copyright_headers"] | The function (_check_file) defined within the public class called public.The function start at line 21 and ends at 40. It contains 19 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 6.0 functions, It has 6.0 functions called ins... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _is_version_file | def _is_version_file(filename: Path) -> bool:if filename.name != "_version.py":return Falsewith open(filename) as infile:lines_read = 0for line in infile:if _generated_by_scm.search(line):return Truelines_read += 1if lines_read > 10:breakreturn False | 5 | 12 | 1 | 55 | 1 | 43 | 54 | 43 | filename | ['lines_read'] | bool | {"Assign": 1, "AugAssign": 1, "For": 1, "If": 3, "Return": 3, "With": 1} | 2 | 12 | 2 | ["open", "_generated_by_scm.search"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.test_copyright_headers_py.test_copyright_headers"] | The function (_is_version_file) defined within the public class called public.The function start at line 43 and ends at 54. It contains 12 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 2.0 functions, It has 2.0 functions calle... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_copyright_headers | def test_copyright_headers():"""Verifies every .py file has an Amazon copyright header."""root_project_dir = Path(__file__)# The root of the project is the directory that contains the test directory.while not (root_project_dir / "test").exists():root_project_dir = root_project_dir.parent# Call out every directory & ext... | 9 | 23 | 0 | 148 | 5 | 57 | 84 | 57 | ['file_count', 'formatted_failed_files', 'failed_files', 'root_project_dir', 'top_level_dirs'] | None | {"Assign": 6, "AugAssign": 1, "Expr": 5, "For": 3, "If": 2, "Try": 1, "While": 1} | 14 | 28 | 14 | ["Path", "exists", "set", "glob", "Path", "print", "_is_version_file", "_check_file", "failed_files.add", "join", "str", "Exception", "len", "print"] | 0 | [] | The function (test_copyright_headers) defined within the public class called public.The function start at line 57 and ends at 84. It contains 23 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 14.0 functions, and It has 14.0 fu... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | temp_job_bundle_dir | def temp_job_bundle_dir():"""Fixture to provide a temporary job bundle directory."""with tempfile.TemporaryDirectory() as job_bundle_dir:yield job_bundle_dir | 1 | 3 | 0 | 16 | 0 | 25 | 31 | 25 | [] | None | {"Expr": 2, "With": 1} | 2 | 7 | 2 | ["tempfile.TemporaryDirectory", "pytest.fixture"] | 0 | [] | The function (temp_job_bundle_dir) defined within the public class called public.The function start at line 25 and ends at 31. 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 function... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | temp_assets_dir | def temp_assets_dir():"""Fixture to provide a temporary directory for asset files."""with tempfile.TemporaryDirectory() as assets_dir:yield assets_dir | 1 | 3 | 0 | 16 | 0 | 35 | 41 | 35 | [] | None | {"Expr": 2, "With": 1} | 2 | 7 | 2 | ["tempfile.TemporaryDirectory", "pytest.fixture"] | 0 | [] | The function (temp_assets_dir) defined within the public class called public.The function start at line 35 and ends at 41. 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 ca... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | temp_cwd | def temp_cwd():"""Fixture to provide a temporary current working directory."""with tempfile.TemporaryDirectory() as cwd:# Change the current working directory to the temporary directoryoriginal_cwd = os.getcwd()try:os.chdir(cwd)yield cwdfinally:# Restore the original current working directoryos.chdir(original_cwd) | 2 | 8 | 0 | 39 | 1 | 45 | 58 | 45 | ['original_cwd'] | None | {"Assign": 1, "Expr": 4, "Try": 1, "With": 1} | 5 | 14 | 5 | ["tempfile.TemporaryDirectory", "os.getcwd", "os.chdir", "os.chdir", "pytest.fixture"] | 0 | [] | The function (temp_cwd) defined within the public class called public.The function start at line 45 and ends at 58. It contains 8 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 5.0 functions, and It has 5.0 functions called in... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | mock_telemetry | def mock_telemetry():"""Fixture to avoid calling telemetry code in unrelated unit tests."""with patch.object(TelemetryClient, "record_event") as mock_telemetry:yield mock_telemetry | 1 | 3 | 0 | 19 | 0 | 62 | 68 | 62 | [] | None | {"Expr": 2, "With": 1} | 2 | 7 | 2 | ["patch.object", "pytest.fixture"] | 0 | [] | The function (mock_telemetry) defined within the public class called public.The function start at line 62 and ends at 68. 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_mock.mock_make_api_call | def mock_make_api_call(self, operation_name, kwarg):service_name = self._service_model.service_nameif service_name == "deadline":# Send the "GetQueue" operation, i.e. the get_queue call, to# deadline_magicmock.get_queue()operation_words = re.findall("[A-Z][a-z]+", operation_name)snake_operation = "_".join(word.lower() ... | 3 | 7 | 3 | 67 | 0 | 95 | 106 | 95 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (deadline_mock.mock_make_api_call) defined within the public class called public.The function start at line 95 and ends at 106. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [95.0] and does not return any value.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | deadline_mock | def deadline_mock():"""Uses the moto library to create a mock boto3 session for all tests to use.Mocks Deadline Cloud via the approach moto recommends for services that itlacks an implementation for.As a special case, deadline.client.api.get_deadline_cloud_library_telemetry_clientis also redirected to deadline_mock.get... | 1 | 53 | 0 | 277 | 7 | 72 | 154 | 72 | ['operation_words', 'original_make_api_call', 'snake_operation', 's3_client', 'deadline_magicmock', 'boto3_session', 'service_name'] | Returns | {"Assign": 17, "Expr": 3, "If": 1, "Return": 2, "With": 2} | 15 | 83 | 15 | ["mock_aws", "MagicMock", "re.findall", "join", "word.lower", "getattr", "original_make_api_call", "boto3.Session", "boto3_session.client", "s3_client.create_bucket", "datetime.fromisoformat", "datetime.fromisoformat", "patch", "patch.object", "patch.object"] | 0 | [] | The function (deadline_mock) defined within the public class called public.The function start at line 72 and ends at 154. It contains 53 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 15.0 functions, and It has 15.0 functi... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _build_filter_function._filter_function | def _filter_function(job) -> bool:return field_name in job and job[field_name] == value | 2 | 2 | 1 | 18 | 0 | 58 | 59 | 58 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_build_filter_function._filter_function) defined within the public class called public.The function start at line 58 and ends at 59. It contains 2 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _build_filter_function._filter_function | def _filter_function(job) -> bool:return field_name in job and job[field_name] == value | 2 | 2 | 1 | 18 | 0 | 62 | 63 | 58 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_build_filter_function._filter_function) defined within the public class called public.The function start at line 62 and ends at 63. It contains 2 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _build_filter_function._filter_function | def _filter_function(job) -> bool:return field_name in job and job[field_name] == value | 2 | 2 | 1 | 18 | 0 | 78 | 79 | 58 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_build_filter_function._filter_function) defined within the public class called public.The function start at line 78 and ends at 79. It contains 2 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _build_filter_function._filter_function | def _filter_function(job) -> bool:return field_name in job and job[field_name] == value | 2 | 2 | 1 | 18 | 0 | 82 | 83 | 58 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_build_filter_function._filter_function) defined within the public class called public.The function start at line 82 and ends at 83. It contains 2 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _build_filter_function | def _build_filter_function(filter) -> Callable[[dict], bool]:try:# This only supports the subset of filters used in the functions we're testing.# You can extend it to support more, to be able to test more cases!if "stringFilter" in filter:filter = filter["stringFilter"]field_name = snake_to_camel(filter["name"].lower()... | 9 | 34 | 1 | 195 | 4 | 43 | 93 | 43 | filter | ['field_name', 'value', 'filter', 'operator'] | Callable[[dict], bool] | {"Assign": 8, "If": 7, "Return": 6, "Try": 1} | 11 | 51 | 11 | ["snake_to_camel", "lower", "isinstance", "ValueError", "snake_to_camel", "lower", "isinstance", "ValueError", "_build_filter_function_from_group", "ValueError", "ValueError"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.mock_deadline_job_apis_py._build_filter_function_from_group"] | The function (_build_filter_function) defined within the public class called public.The function start at line 43 and ends at 93. It contains 34 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 11.0 functions, It has 11.0 functio... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _build_filter_function_from_reduction._filter_function | def _filter_function(job) -> bool:return all_or_any(filter(job) for filter in filter_list) | 2 | 2 | 1 | 19 | 0 | 97 | 98 | 97 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_build_filter_function_from_reduction._filter_function) defined within the public class called public.The function start at line 97 and ends at 98. It contains 2 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _build_filter_function_from_reduction | def _build_filter_function_from_reduction(filter_list, all_or_any) -> Callable[[dict], bool]:def _filter_function(job) -> bool:return all_or_any(filter(job) for filter in filter_list)return _filter_function | 1 | 3 | 2 | 20 | 0 | 96 | 100 | 96 | filter_list,all_or_any | [] | Callable[[dict], bool] | {"Return": 2} | 2 | 5 | 2 | ["all_or_any", "filter"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.mock_deadline_job_apis_py._build_filter_function_from_group"] | The function (_build_filter_function_from_reduction) defined within the public class called public.The function start at line 96 and ends at 100. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [96.0] and does not return any value. It declares 2.0 functions, It... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _build_filter_function_from_group | def _build_filter_function_from_group(filter_expressions) -> Callable[[dict], bool]:"""Given a filterExpressions parameter value for deadline:SearchJobs, constructs a Pythoncallable that returns True/False depending on whether the job matches the filter."""filters = [_build_filter_function(filter) for filter in filter_... | 5 | 12 | 1 | 80 | 3 | 103 | 121 | 103 | filter_expressions | ['all_or_any', 'operator', 'filters'] | Callable[[dict], bool] | {"Assign": 4, "Expr": 1, "If": 3, "Return": 2} | 4 | 19 | 4 | ["_build_filter_function", "len", "ValueError", "_build_filter_function_from_reduction"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.mock_deadline_job_apis_py._build_filter_function", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline... | The function (_build_filter_function_from_group) defined within the public class called public.The function start at line 103 and ends at 121. It contains 12 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 4.0 functions, It has ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | mock_search_jobs_for_set._fake_search_jobs | def _fake_search_jobs(farmId, queueIds, itemOffset, pageSize=100, filterExpressions={}, sortExpressions=[]):# Make deep copies of these parameters so we can destructively assert about themfilterExpressions = deepcopy(filterExpressions)sortExpressions = deepcopy(sortExpressions)assert farmId == farmIdForJobsassert queue... | 6 | 25 | 6 | 200 | 0 | 131 | 166 | 131 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (mock_search_jobs_for_set._fake_search_jobs) defined within the public class called public.The function start at line 131 and ends at 166. It contains 25 lines of code and it has a cyclomatic complexity of 6. It takes 6 parameters, represented as [131.0] and does not return any value.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | mock_search_jobs_for_set | def mock_search_jobs_for_set(farmIdForJobs, queueIdForJobs, jobs):"""Returns a fake "search_jobs" API that emulates a subset of Deadline Cloud'sSearchJobs on the provided set of jobs.See https://docs.aws.amazon.com/deadline-cloud/latest/APIReference/API_SearchJobs.html"""def _fake_search_jobs(farmId, queueIds, itemOffs... | 1 | 3 | 3 | 14 | 8 | 124 | 168 | 124 | farmIdForJobs,queueIdForJobs,jobs | ['filter', 'field_sort_name', 'nextItemOffset', 'filterExpressions', 'response_jobs', 'response', 'result_jobs', 'sortExpressions'] | Returns | {"Assign": 10, "Expr": 1, "For": 1, "If": 2, "Return": 2} | 13 | 45 | 13 | ["deepcopy", "deepcopy", "pop", "_build_filter_function_from_group", "sorted", "replace", "field_sort_name.lower", "filter", "min", "len", "deepcopy", "len", "len"] | 12 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_list_jobs_by_filter_expression_py.test_list_jobs_by_filter_expression", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_dea... | The function (mock_search_jobs_for_set) defined within the public class called public.The function start at line 124 and ends at 168. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [124.0], and this function return a value. It declares 13.0 functions, It has 1... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | mock_get_job_for_set._fake_get_job | def _fake_get_job(farmId, queueId, jobId):assert farmId == farmIdForJobsassert queueId == queueIdForJobsmatching_jobs = [job for job in jobs if job["jobId"] == jobId]if matching_jobs:return matching_jobs[0]else:error_class = botocore.exceptions.from_code(404)raise error_class(f"Resource of type job with id {jobId} does... | 4 | 9 | 3 | 61 | 0 | 178 | 188 | 178 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (mock_get_job_for_set._fake_get_job) defined within the public class called public.The function start at line 178 and ends at 188. It contains 9 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [178.0] and does not return any value.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | mock_get_job_for_set | def mock_get_job_for_set(farmIdForJobs, queueIdForJobs, jobs):"""Returns a fake "get_job" API that emulates a subset of Deadline Cloud'sGetJob on the provided set of jobs.See https://docs.aws.amazon.com/deadline-cloud/latest/APIReference/API_GetJob.html"""def _fake_get_job(farmId, queueId, jobId):assert farmId == farmI... | 1 | 3 | 3 | 14 | 2 | 171 | 190 | 171 | farmIdForJobs,queueIdForJobs,jobs | ['matching_jobs', 'error_class'] | Returns | {"Assign": 2, "Expr": 1, "If": 1, "Return": 2} | 2 | 20 | 2 | ["botocore.exceptions.from_code", "error_class"] | 8 | ["_.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_bootstrap_and_completion", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.948... | The function (mock_get_job_for_set) defined within the public class called public.The function start at line 171 and ends at 190. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [171.0], and this function return a value. It declares 2.0 functions, It has 2.0 fu... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | create_fake_job_list | def create_fake_job_list(job_count: int,timestamp_min: Optional[datetime] = None,timestamp_max: Optional[datetime] = None,):"""See https://docs.aws.amazon.com/deadline-cloud/latest/APIReference/API_JobSearchSummary.htmlThe list_jobs_recently_updated function only uses jobId and timestamps, so we're only populatingthose... | 9 | 25 | 3 | 196 | 4 | 193 | 229 | 193 | job_count,timestamp_min,timestamp_max | ['timestamp_min', 'random_micros', 'updated_at_micros_range', 'timestamp_max'] | Returns | {"AnnAssign": 1, "Assign": 8, "Expr": 1, "For": 3, "If": 3, "Return": 1} | 13 | 37 | 13 | ["datetime", "datetime", "replace", "str", "uuid.uuid4", "range", "int", "total_seconds", "randrange", "timedelta", "randrange", "randrange", "choice"] | 12 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_list_jobs_by_filter_expression_py.test_list_jobs_by_filter_expression", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_dea... | The function (create_fake_job_list) defined within the public class called public.The function start at line 193 and ends at 229. It contains 25 lines of code and it has a cyclomatic complexity of 9. It takes 3 parameters, represented as [193.0], and this function return a value. It declares 13.0 functions, It has 13.0... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _batfile_quote | def _batfile_quote(s: str) -> str:"""Quotes the string so it can be echoed in a batfile script."""for replacement in [("%", "%%"),('"', '""'),("^", "^^"),("&", "^&"),("<", "^<"),(">", "^>"),("|", "^|"),]:s = s.replace(*replacement)return f"{s}" | 2 | 12 | 1 | 70 | 0 | 33 | 45 | 33 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_batfile_quote) defined within the public class called public.The function start at line 33 and ends at 45. It contains 12 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _format_sleep | def _format_sleep(seconds: float) -> str:return f'powershell -nop -c "{{sleep {seconds}}}" > nul\n' | 1 | 2 | 1 | 12 | 0 | 50 | 51 | 50 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_format_sleep) defined within the public class called public.The function start at line 50 and ends at 51. 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 | _format_line | def _format_line(line: str) -> str:return f"echo.{line}\n" | 1 | 2 | 1 | 12 | 0 | 53 | 54 | 53 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_format_line) defined within the public class called public.The function start at line 53 and ends at 54. 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 | _format_exit | def _format_exit(exit_code: int) -> str:return f"exit {exit_code}\n" | 1 | 2 | 1 | 12 | 0 | 56 | 57 | 56 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_format_exit) defined within the public class called public.The function start at line 56 and ends at 57. 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 | _format_args_check | def _format_args_check(args: Tuple[str], args_index: int) -> str:result = ["set MATCHED=YES\n"]for i, arg in enumerate(args, start=1):result.append(f'if not "%{i}" == "{_batfile_quote(arg)}" set MATCHED=NO\n')result.append(f'if not "%{len(args) + 1}" == "" set MATCHED=NO\n')result.append(f"if %MATCHED% == NO goto no_ma... | 2 | 7 | 2 | 63 | 0 | 59 | 65 | 59 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_format_args_check) defined within the public class called public.The function start at line 59 and ends at 65. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [59.0] and does not return any value.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _format_end_args_check | def _format_end_args_check(args_index: int) -> str:return f":no_match_{args_index}\n" | 1 | 2 | 1 | 12 | 0 | 67 | 68 | 67 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_format_end_args_check) defined within the public class called public.The function start at line 67 and ends at 68. 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 | _format_sleep | def _format_sleep(seconds: float) -> str:return f'powershell -nop -c "{{sleep {seconds}}}" > nul\n' | 1 | 2 | 1 | 12 | 0 | 76 | 77 | 50 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_format_sleep) defined within the public class called public.The function start at line 76 and ends at 77. 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 | _format_line | def _format_line(line: str) -> str:return f"echo.{line}\n" | 1 | 2 | 1 | 12 | 0 | 79 | 80 | 53 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_format_line) defined within the public class called public.The function start at line 79 and ends at 80. 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 | _format_exit | def _format_exit(exit_code: int) -> str:return f"exit {exit_code}\n" | 1 | 2 | 1 | 12 | 0 | 82 | 83 | 56 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_format_exit) defined within the public class called public.The function start at line 82 and ends at 83. 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 | _format_args_check | def _format_args_check(args: Tuple[str], args_index: int) -> str:result = [f"if [ $# == {len(args)} ] "]for i, arg in enumerate(args, start=1):result.append(f'&& [ "${i}" == {shlex.quote(arg)} ] ')result.append("; then ")# lack of \n here puts the next commend with the `then`return "".join(result) | 2 | 6 | 2 | 56 | 0 | 85 | 90 | 85 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_format_args_check) defined within the public class called public.The function start at line 85 and ends at 90. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [85.0] and does not return any value.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _format_end_args_check | def _format_end_args_check(args_index: int) -> str:return "fi\n" | 1 | 2 | 1 | 11 | 0 | 92 | 93 | 92 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (_format_end_args_check) defined within the public class called public.The function start at line 92 and ends at 93. 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 | snake_to_camel | def snake_to_camel(value: str) -> str:"""Convertes snake_case_val to snakeCaseVal"""return re.sub(r"_\S", lambda s: s[0][1].upper(), value) | 1 | 2 | 1 | 35 | 0 | 96 | 98 | 96 | value | [] | str | {"Expr": 1, "Return": 1} | 2 | 3 | 2 | ["re.sub", "upper"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556496_BerriAI_litellm.litellm.llms.vertex_ai.image_generation.image_generation_handler_py.VertexImageGeneration.transform_optional_params", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_dead... | The function (snake_to_camel) defined within the public class called public.The function start at line 96 and ends at 98. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions called i... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | _format_output_and_exit | def _format_output_and_exit(program_output: str, exit_code: int) -> str:result = []for line in program_output.splitlines():result.append(_format_line(line))result.append(_format_exit(exit_code))return "".join(result) | 2 | 6 | 2 | 51 | 1 | 101 | 106 | 101 | program_output,exit_code | ['result'] | str | {"Assign": 1, "Expr": 2, "For": 1, "Return": 1} | 6 | 6 | 6 | ["program_output.splitlines", "result.append", "_format_line", "result.append", "_format_exit", "join"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.testing_utilities_py.program_that_prints_output"] | The function (_format_output_and_exit) defined within the public class called public.The function start at line 101 and ends at 106. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [101.0] and does not return any value. It declares 6.0 functions, It has 6.0 fun... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | program_that_prints_output | def program_that_prints_output(program_output: str,exit_code: int,*,sleep_seconds=0.1,conditional_outputs: Optional[Dict[Tuple[str], Tuple[str, int]]] = None,):"""This context manager creates a program that prints the specified output, then returnsthe specified exit code.By default, the program sleeps for 0.1 seconds, ... | 6 | 31 | 5 | 193 | 0 | 110 | 152 | 110 | program_output,exit_code,sleep_seconds,conditional_outputs | [] | None | {"Expr": 11, "For": 1, "If": 3, "Try": 1, "With": 1} | 17 | 43 | 17 | ["tempfile.NamedTemporaryFile", "temp.write", "temp.write", "_format_sleep", "enumerate", "conditional_outputs.items", "temp.write", "_format_args_check", "temp.write", "_format_output_and_exit", "temp.write", "_format_end_args_check", "temp.write", "_format_output_and_exit", "temp.flush", "os.chmod", "os.remove"] | 0 | [] | The function (program_that_prints_output) defined within the public class called public.The function start at line 110 and ends at 152. It contains 31 lines of code and it has a cyclomatic complexity of 6. It takes 5 parameters, represented as [110.0] and does not return any value. It declares 17.0 functions, and It h... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | write_test_asset_files | def write_test_asset_files(assets_dir: str, asset_contents: Dict[str, str]):"""Write a set of asset contents files to the provided assets directory.Each key of asset_contents is a relative path from assets_dir, andeach value is what to write to the file."""for rel_path, contents in asset_contents.items():path = os.path... | 5 | 13 | 2 | 130 | 1 | 155 | 172 | 155 | assets_dir,asset_contents | ['path'] | None | {"Assign": 1, "Expr": 4, "For": 1, "If": 3, "With": 2} | 13 | 18 | 13 | ["asset_contents.items", "os.path.join", "os.path.isdir", "os.path.dirname", "os.makedirs", "os.path.dirname", "isinstance", "open", "f.write", "isinstance", "open", "f.write", "ValueError"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_asset_refs_py.test_create_job_from_job_bundle_with_all_asset_ref_variants", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3... | The function (write_test_asset_files) defined within the public class called public.The function start at line 155 and ends at 172. It contains 13 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [155.0] and does not return any value. It declares 13.0 functions, It has 13.0 f... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | patch_calls_for_create_job_from_job_bundle | def patch_calls_for_create_job_from_job_bundle(*,create_job_return=MOCK_CREATE_JOB_RESPONSE,get_job_return=MOCK_GET_JOB_RESPONSE,get_queue_return={"displayName": "Test Queue","jobAttachmentSettings": {"s3BucketName": "mock", "rootPrefix": "root"},},queue_paramdefs=[],upload_assets_return=[SummaryStatistics(),Attachment... | 1 | 22 | 5 | 80 | 0 | 176 | 197 | 176 | create_job_return,get_job_return,get_queue_return,queue_paramdefs,upload_assets_return | [] | None | {"Assign": 15, "Expr": 2, "With": 1} | 19 | 74 | 19 | ["SummaryStatistics", "Attachments", "ManifestProperties", "patch.object", "patch.object", "patch.object", "patch.object", "patch.object", "patch", "patch.object", "patch.object", "patch.object", "Mock", "boto3_session_mock", "mock.get_boto3_client", "mock.get_boto3_client", "mock.get_boto3_client", "mock.get_boto3_cli... | 16 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_job_bundle_submission_py.test_create_job_from_job_bundle", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.t... | The function (patch_calls_for_create_job_from_job_bundle) defined within the public class called public.The function start at line 176 and ends at 197. It contains 22 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [176.0] and does not return any value. It declares 19.0 func... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_list_farms_paginated | def test_list_farms_paginated(fresh_deadline_config):"""Confirm api.list_farms concatenates multiple pages"""with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").list_farms.side_effect = [{"farms": FARMS_LIST[:2], "nextToken": "abc"},{"farms": FARMS_LIST[2:3], "nextToke... | 1 | 9 | 1 | 88 | 1 | 42 | 54 | 42 | fresh_deadline_config | ['farms'] | None | {"Assign": 2, "Expr": 1, "With": 1} | 4 | 13 | 4 | ["patch.object", "client", "session_mock", "api.list_farms"] | 0 | [] | The function (test_list_farms_paginated) defined within the public class called public.The function start at line 42 and ends at 54. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 functions, and It has 4.0 fu... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_list_farms_principal_id | def test_list_farms_principal_id(fresh_deadline_config, pass_principal_id_filter, user_identities):"""Confirm api.list_farms sets the principalId parameter appropriately"""with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").list_farms.side_effect = [{"farms": FARMS_LIS... | 5 | 27 | 3 | 172 | 1 | 59 | 92 | 59 | fresh_deadline_config,pass_principal_id_filter,user_identities | ['farms'] | None | {"Assign": 5, "Expr": 4, "If": 4, "With": 1} | 19 | 34 | 19 | ["patch.object", "client", "session_mock", "_session.get_scoped_config", "session_mock", "session_mock", "api.list_farms", "api.list_farms", "list_farms.assert_called_once_with", "client", "session_mock", "list_farms.assert_called_once_with", "client", "session_mock", "list_farms.assert_called_once_with", "client", "se... | 0 | [] | The function (test_list_farms_principal_id) defined within the public class called public.The function start at line 59 and ends at 92. It contains 27 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [59.0] and does not return any value. It declares 19.0 functions, and It ha... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_list_jobs_paginated | def test_list_jobs_paginated(fresh_deadline_config):"""Confirm api.list_jobs concatenates multiple pages"""with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").list_jobs.side_effect = [{"jobs": JOBS_LIST[:2], "nextToken": "abc"},{"jobs": JOBS_LIST[2:3], "nextToken": "de... | 1 | 9 | 1 | 88 | 1 | 37 | 49 | 37 | fresh_deadline_config | ['jobs'] | None | {"Assign": 2, "Expr": 1, "With": 1} | 4 | 13 | 4 | ["patch.object", "client", "session_mock", "api.list_jobs"] | 0 | [] | The function (test_list_jobs_paginated) defined within the public class called public.The function start at line 37 and ends at 49. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 functions, and It has 4.0 fun... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_list_jobs_principal_id | def test_list_jobs_principal_id(fresh_deadline_config, pass_principal_id_filter, user_identities):"""Confirm api.list_jobs sets the principalId parameter appropriately"""with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").list_jobs.side_effect = [{"jobs": JOBS_LIST},]i... | 5 | 26 | 3 | 157 | 1 | 54 | 85 | 54 | fresh_deadline_config,pass_principal_id_filter,user_identities | ['jobs'] | None | {"Assign": 4, "Expr": 4, "If": 4, "With": 1} | 17 | 32 | 17 | ["patch.object", "client", "session_mock", "session_mock", "api.list_jobs", "api.list_jobs", "list_jobs.assert_called_once_with", "client", "session_mock", "list_jobs.assert_called_once_with", "client", "session_mock", "list_jobs.assert_called_once_with", "client", "session_mock", "pytest.mark.parametrize", "pytest.mar... | 0 | [] | The function (test_list_jobs_principal_id) defined within the public class called public.The function start at line 54 and ends at 85. It contains 26 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [54.0] and does not return any value. It declares 17.0 functions, and It has... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_list_queues_paginated | def test_list_queues_paginated(fresh_deadline_config):"""Confirm api.list_queues concatenates multiple pages"""with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").list_queues.side_effect = [{"queues": QUEUES_LIST[:2], "nextToken": "abc"},{"queues": QUEUES_LIST[2:3], "n... | 1 | 9 | 1 | 88 | 1 | 42 | 54 | 42 | fresh_deadline_config | ['queues'] | None | {"Assign": 2, "Expr": 1, "With": 1} | 4 | 13 | 4 | ["patch.object", "client", "session_mock", "api.list_queues"] | 0 | [] | The function (test_list_queues_paginated) defined within the public class called public.The function start at line 42 and ends at 54. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 functions, and It has 4.0 f... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_list_queues_principal_id | def test_list_queues_principal_id(fresh_deadline_config, pass_principal_id_filter, user_identities):"""Confirm api.list_queues sets the principalId parameter appropriately"""with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").list_queues.side_effect = [{"queues": QUEUE... | 5 | 26 | 3 | 157 | 1 | 59 | 90 | 59 | fresh_deadline_config,pass_principal_id_filter,user_identities | ['queues'] | None | {"Assign": 4, "Expr": 4, "If": 4, "With": 1} | 17 | 32 | 17 | ["patch.object", "client", "session_mock", "session_mock", "api.list_queues", "api.list_queues", "list_queues.assert_called_once_with", "client", "session_mock", "list_queues.assert_called_once_with", "client", "session_mock", "list_queues.assert_called_once_with", "client", "session_mock", "pytest.mark.parametrize", "... | 0 | [] | The function (test_list_queues_principal_id) defined within the public class called public.The function start at line 59 and ends at 90. It contains 26 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [59.0] and does not return any value. It declares 17.0 functions, and It h... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_get_boto3_session | def test_get_boto3_session(fresh_deadline_config):"""Confirm that api.get_boto3_session gets a session for the configured profile"""config.set_setting("defaults.aws_profile_name", "SomeRandomProfileName")mock_session = MagicMock()with patch.object(boto3, "Session", return_value=mock_session) as boto3_session:# Testing ... | 1 | 7 | 1 | 54 | 2 | 15 | 26 | 15 | fresh_deadline_config | ['result', 'mock_session'] | None | {"Assign": 2, "Expr": 3, "With": 1} | 5 | 12 | 5 | ["config.set_setting", "MagicMock", "patch.object", "api.get_boto3_session", "boto3_session.assert_called_once_with"] | 0 | [] | The function (test_get_boto3_session) defined within the public class called public.The function start at line 15 and ends at 26. 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.0 funct... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_get_boto3_session_caching_behavior.mock_create_session | def mock_create_session(profile_name: Optional[str]):session = MagicMock()session._profile_name = profile_namereturn session | 1 | 4 | 1 | 22 | 0 | 36 | 39 | 36 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_get_boto3_session_caching_behavior.mock_create_session) defined within the public class called public.The function start at line 36 and ends at 39. 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.. |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_get_boto3_session_caching_behavior | def test_get_boto3_session_caching_behavior(fresh_deadline_config):"""Confirm that api.get_boto3_session caches the session, and refreshes ifthe configured profile name changes"""# mock boto3.Session to return a fresh object based on the input profile namedef mock_create_session(profile_name: Optional[str]):session = M... | 1 | 19 | 1 | 106 | 5 | 29 | 71 | 29 | fresh_deadline_config | ['session2', 'session3', 'session0', 'session1', 'session'] | Returns | {"Assign": 6, "Expr": 3, "Return": 1, "With": 1} | 10 | 43 | 10 | ["MagicMock", "patch.object", "api.get_boto3_session", "api.get_boto3_session", "config.set_setting", "api.get_boto3_session", "api.get_boto3_session", "boto3_session.assert_has_calls", "call", "call"] | 0 | [] | The function (test_get_boto3_session_caching_behavior) defined within the public class called public.The function start at line 29 and ends at 71. It contains 19 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 10.0 functions... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_get_check_authentication_status_authenticated | def test_get_check_authentication_status_authenticated(fresh_deadline_config):"""Confirm that check_authentication_status returns AUTHENTICATED"""with patch.object(api._session, "get_boto3_session") as session_mock, patch.object(api, "get_boto3_session", new=session_mock):config.set_setting("defaults.aws_profile_name",... | 1 | 7 | 1 | 68 | 0 | 74 | 82 | 74 | fresh_deadline_config | [] | None | {"Assign": 1, "Expr": 2, "With": 1} | 6 | 9 | 6 | ["patch.object", "patch.object", "config.set_setting", "client", "session_mock", "api.check_authentication_status"] | 0 | [] | The function (test_get_check_authentication_status_authenticated) defined within the public class called public.The function start at line 74 and ends at 82. 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 6.0 func... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_get_check_authentication_status_configuration_error | def test_get_check_authentication_status_configuration_error(fresh_deadline_config):"""Confirm that check_authentication_status returns CONFIGURATION_ERROR"""with patch.object(api._session, "get_boto3_session") as session_mock, patch.object(api, "get_boto3_session", new=session_mock):config.set_setting("defaults.aws_pr... | 1 | 9 | 1 | 70 | 0 | 85 | 95 | 85 | fresh_deadline_config | [] | None | {"Assign": 1, "Expr": 2, "With": 1} | 7 | 11 | 7 | ["patch.object", "patch.object", "config.set_setting", "client", "session_mock", "Exception", "api.check_authentication_status"] | 0 | [] | The function (test_get_check_authentication_status_configuration_error) defined within the public class called public.The function start at line 85 and ends at 95. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 7.... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_get_queue_user_boto3_session_no_profile | def test_get_queue_user_boto3_session_no_profile(fresh_deadline_config):"""Make sure that boto3.Session gets called with profile_name=None for the default profile."""session_mock = MagicMock()# The value returned when no profile was selected is "default"session_mock.profile_name = "default"session_mock.region_name = "u... | 2 | 18 | 1 | 113 | 3 | 98 | 118 | 98 | fresh_deadline_config | ['session_mock', 'mock_botocore_session', 'deadline_mock'] | None | {"Assign": 6, "Expr": 3, "With": 1} | 8 | 21 | 8 | ["MagicMock", "MagicMock", "MagicMock", "patch.object", "patch", "patch", "api.get_queue_user_boto3_session", "boto3_session_mock.assert_called_once_with"] | 0 | [] | The function (test_get_queue_user_boto3_session_no_profile) defined within the public class called public.The function start at line 98 and ends at 118. It contains 18 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 8.0 function... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_check_deadline_api_available | def test_check_deadline_api_available(fresh_deadline_config):with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").list_farms.return_value = {"farms": []}# Call the function under testresult = api.check_deadline_api_available()assert result is True# It should have called... | 1 | 6 | 1 | 66 | 1 | 121 | 130 | 121 | fresh_deadline_config | ['result'] | None | {"Assign": 2, "Expr": 1, "With": 1} | 7 | 10 | 7 | ["patch.object", "client", "session_mock", "api.check_deadline_api_available", "list_farms.assert_called_once_with", "client", "session_mock"] | 0 | [] | The function (test_check_deadline_api_available) defined within the public class called public.The function start at line 121 and ends at 130. 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 7.0 functions, and It ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_check_deadline_api_available_fails | def test_check_deadline_api_available_fails(fresh_deadline_config):with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").list_farms.side_effect = Exception()# Call the function under testresult = api.check_deadline_api_available()assert result is False# It should have ca... | 1 | 6 | 1 | 63 | 1 | 133 | 142 | 133 | fresh_deadline_config | ['result'] | None | {"Assign": 2, "Expr": 1, "With": 1} | 8 | 10 | 8 | ["patch.object", "client", "session_mock", "Exception", "api.check_deadline_api_available", "list_farms.assert_called_once_with", "client", "session_mock"] | 0 | [] | The function (test_check_deadline_api_available_fails) defined within the public class called public.The function start at line 133 and ends at 142. 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 8.0 functions, an... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_get_session_client_caching | def test_get_session_client_caching():"""Test that get_session_client properly caches clients."""# Create a real boto3 session for testing the cachesession = boto3.Session()# First call should create a new clientclient1 = get_session_client(session, "s3")# Second call with same session should return the same clientclie... | 1 | 10 | 0 | 65 | 6 | 145 | 167 | 145 | ['client2', 'client3', 'session', 'new_session', 'client4', 'client1'] | None | {"Assign": 6, "Expr": 1} | 6 | 23 | 6 | ["boto3.Session", "get_session_client", "get_session_client", "get_session_client", "boto3.Session", "get_session_client"] | 0 | [] | The function (test_get_session_client_caching) defined within the public class called public.The function start at line 145 and ends at 167. It contains 10 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It h... | |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_precache_clients | def test_precache_clients(mock_get_boto3_client, mock_get_queue_user_session, mock_get_s3_client):"""Test that precache_clients calls the right functions."""# Setup mocksmock_deadline_client = MagicMock()mock_deadline_client.get_queue.return_value = {"displayName": "test-queue"}mock_get_boto3_client.return_value = mock... | 1 | 11 | 3 | 72 | 2 | 173 | 190 | 173 | mock_get_boto3_client,mock_get_queue_user_session,mock_get_s3_client | ['mock_deadline_client', 'mock_session'] | None | {"Assign": 5, "Expr": 6} | 10 | 18 | 10 | ["MagicMock", "MagicMock", "precache_clients", "mock_get_boto3_client.assert_called_once_with", "mock_deadline_client.get_queue.assert_called_once", "mock_get_queue_user_session.assert_called_once", "mock_get_s3_client.assert_called_once_with", "patch", "patch", "patch"] | 0 | [] | The function (test_precache_clients) defined within the public class called public.The function start at line 173 and ends at 190. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [173.0] and does not return any value. It declares 10.0 functions, and It has 10... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_precache_clients_with_params | def test_precache_clients_with_params(mock_get_boto3_client, mock_get_queue_user_session, mock_get_s3_client):"""Test that precache_clients uses provided parameters correctly."""# Setup mocksmock_deadline_client = MagicMock()mock_session = MagicMock()mock_config = MagicMock()mock_get_queue_user_session.return_value = m... | 1 | 24 | 3 | 96 | 3 | 196 | 229 | 196 | mock_get_boto3_client,mock_get_queue_user_session,mock_get_s3_client | ['mock_deadline_client', 'mock_config', 'mock_session'] | None | {"Assign": 4, "Expr": 6} | 11 | 34 | 11 | ["MagicMock", "MagicMock", "MagicMock", "precache_clients", "mock_get_boto3_client.assert_not_called", "mock_deadline_client.get_queue.assert_not_called", "mock_get_queue_user_session.assert_called_once_with", "mock_get_s3_client.assert_called_once_with", "patch", "patch", "patch"] | 0 | [] | The function (test_precache_clients_with_params) defined within the public class called public.The function start at line 196 and ends at 229. It contains 24 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [196.0] and does not return any value. It declares 11.0 functions, an... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_precache_clients_warms_asset_uploader_client | def test_precache_clients_warms_asset_uploader_client(fresh_deadline_config):"""Test that initializing the deadline and S3 client with precache_clientsproperly pre-warms the cache for subsequent job submissions."""# Setup mocksmock_deadline_client = MagicMock()mock_deadline_client.get_queue.return_value = {"displayName... | 1 | 17 | 1 | 100 | 4 | 232 | 266 | 232 | fresh_deadline_config | ['uploader', 'real_session', 'mock_deadline_client', 's3_client2'] | None | {"Assign": 6, "Expr": 1, "With": 1} | 6 | 35 | 6 | ["MagicMock", "boto3.Session", "patch", "patch", "precache_clients", "S3AssetUploader"] | 0 | [] | The function (test_precache_clients_warms_asset_uploader_client) defined within the public class called public.The function start at line 232 and ends at 266. 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 6.0 fu... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_list_storage_profiles_for_queue_paginated | def test_list_storage_profiles_for_queue_paginated(fresh_deadline_config):"""Confirm api.list_storage_profiles_for_queue concatenates multiple pages"""with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").list_storage_profiles_for_queue.side_effect = [{"storageProfiles":... | 1 | 9 | 1 | 88 | 1 | 42 | 54 | 42 | fresh_deadline_config | ['storage_profiles'] | None | {"Assign": 2, "Expr": 1, "With": 1} | 4 | 13 | 4 | ["patch.object", "client", "session_mock", "api.list_storage_profiles_for_queue"] | 0 | [] | The function (test_list_storage_profiles_for_queue_paginated) defined within the public class called public.The function start at line 42 and ends at 54. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 function... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_list_storage_profiles_for_queue | def test_list_storage_profiles_for_queue(fresh_deadline_config, user_identities):"""Confirm api.list_storage_profiles_for_queue sets the principalId parameter appropriately"""with patch.object(api._session, "get_boto3_session") as session_mock:session_mock().client("deadline").list_storage_profiles_for_queue.side_effec... | 2 | 14 | 2 | 98 | 1 | 58 | 76 | 58 | fresh_deadline_config,user_identities | ['storage_profiles'] | None | {"Assign": 3, "Expr": 2, "If": 1, "With": 1} | 9 | 19 | 9 | ["patch.object", "client", "session_mock", "session_mock", "api.list_storage_profiles_for_queue", "list_storage_profiles_for_queue.assert_called_once_with", "client", "session_mock", "pytest.mark.parametrize"] | 0 | [] | The function (test_list_storage_profiles_for_queue) defined within the public class called public.The function start at line 58 and ends at 76. It contains 14 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [58.0] and does not return any value. It declares 9.0 functions, and... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | fixture_telemetry_client | def fixture_telemetry_client(fresh_deadline_config):config.set_setting("defaults.aws_profile_name", "SomeRandomProfileName")with patch.object(api.TelemetryClient, "_start_threads"), patch.object(api._telemetry, "get_monitor_id", side_effect=["monitor-id"]), patch.object(api._telemetry, "get_monitor_id", side_effect=[No... | 1 | 18 | 1 | 127 | 1 | 24 | 41 | 24 | fresh_deadline_config | ['client'] | Returns | {"Assign": 1, "Expr": 1, "Return": 1, "With": 1} | 9 | 18 | 9 | ["config.set_setting", "patch.object", "patch.object", "patch.object", "patch.object", "patch.object", "TelemetryClient", "config.config_file.read_config", "pytest.fixture"] | 0 | [] | The function (fixture_telemetry_client) defined within the public class called public.The function start at line 24 and ends at 41. It contains 18 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 | test_opt_out_config | def test_opt_out_config(fresh_deadline_config):"""Ensures the telemetry client doesn't fully initialize if the opt out config setting is set"""# GIVENconfig.set_setting("defaults.aws_profile_name", "SomeRandomProfileName")config.set_setting("telemetry.opt_out", "true")# WHENclient = TelemetryClient("deadline-cloud-libr... | 1 | 13 | 1 | 108 | 1 | 44 | 61 | 44 | fresh_deadline_config | ['client'] | None | {"Assign": 1, "Expr": 6} | 14 | 18 | 14 | ["config.set_setting", "config.set_setting", "TelemetryClient", "config.config_file.read_config", "hasattr", "hasattr", "hasattr", "client.record_hashing_summary", "SummaryStatistics", "client.record_upload_summary", "SummaryStatistics", "client.record_error", "str", "type"] | 0 | [] | The function (test_opt_out_config) defined within the public class called public.The function start at line 44 and ends at 61. 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 14.0 functions, and It has 14.0 funct... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_opt_out_env_var | def test_opt_out_env_var(fresh_deadline_config, monkeypatch, env_var_value):"""Ensures the telemetry client doesn't fully initialize if the opt out env var is set"""# GIVENconfig.set_setting("defaults.aws_profile_name", "SomeRandomProfileName")monkeypatch.setenv("DEADLINE_CLOUD_TELEMETRY_OPT_OUT", env_var_value)config.... | 1 | 16 | 3 | 120 | 1 | 73 | 93 | 73 | fresh_deadline_config,monkeypatch,env_var_value | ['client'] | None | {"Assign": 1, "Expr": 7} | 20 | 21 | 20 | ["config.set_setting", "monkeypatch.setenv", "config.set_setting", "TelemetryClient", "config.config_file.read_config", "hasattr", "hasattr", "hasattr", "client.record_hashing_summary", "SummaryStatistics", "client.record_upload_summary", "SummaryStatistics", "client.record_error", "str", "type", "pytest.mark.parametri... | 0 | [] | The function (test_opt_out_env_var) defined within the public class called public.The function start at line 73 and ends at 93. It contains 16 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [73.0] and does not return any value. It declares 20.0 functions, and It has 20.0 f... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_initialize_failure_then_success | def test_initialize_failure_then_success(fresh_deadline_config):"""Tests that a failure in initializing set keeps the property as false, but trying againwithout an exception initializes everything successfully."""config.set_setting("defaults.aws_profile_name", "SomeRandomProfileName")with patch.object(api.TelemetryClie... | 1 | 27 | 1 | 182 | 1 | 96 | 128 | 96 | fresh_deadline_config | ['client'] | None | {"Assign": 1, "Expr": 3, "With": 1} | 13 | 33 | 13 | ["config.set_setting", "patch.object", "patch.object", "patch.object", "patch.object", "Exception", "TelemetryClient", "config.config_file.read_config", "hasattr", "hasattr", "hasattr", "client.initialize", "config.config_file.read_config"] | 0 | [] | The function (test_initialize_failure_then_success) defined within the public class called public.The function start at line 96 and ends at 128. It contains 27 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_get_telemetry_identifier | def test_get_telemetry_identifier(fresh_deadline_config, mock_telemetry_client):"""Ensures that getting the local-user-id handles empty/malformed strings"""# Confirm that we generate a new UUID if the setting doesn't exist, and write to configuuid.UUID(mock_telemetry_client.telemetry_id, version=4)# Should not raise Va... | 1 | 9 | 2 | 77 | 1 | 131 | 145 | 131 | fresh_deadline_config,mock_telemetry_client | ['telemetry_id'] | None | {"Assign": 1, "Expr": 4} | 7 | 15 | 7 | ["uuid.UUID", "config.get_setting", "config.set_setting", "mock_telemetry_client._get_telemetry_identifier", "uuid.UUID", "config.get_setting", "mock_telemetry_client._get_telemetry_identifier"] | 0 | [] | The function (test_get_telemetry_identifier) defined within the public class called public.The function start at line 131 and ends at 145. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [131.0] and does not return any value. It declares 7.0 functions, and It ... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_process_event_queue_thread | def test_process_event_queue_thread(fresh_deadline_config, mock_telemetry_client):"""Test that the queue processing thread function exits cleanly after getting None"""# GIVENqueue_mock = MagicMock()queue_mock.get.side_effect = [TelemetryEvent(), None]mock_telemetry_client.event_queue = queue_mock# WHENwith patch.object... | 1 | 8 | 2 | 61 | 1 | 149 | 160 | 149 | fresh_deadline_config,mock_telemetry_client | ['queue_mock'] | None | {"Assign": 3, "Expr": 3, "With": 1} | 6 | 12 | 6 | ["MagicMock", "TelemetryEvent", "patch.object", "mock_telemetry_client._process_event_queue_thread", "urlopen_mock.assert_called_once", "pytest.mark.timeout"] | 0 | [] | The function (test_process_event_queue_thread) defined within the public class called public.The function start at line 149 and ends at 160. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [149.0] and does not return any value. It declares 6.0 functions, and I... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_process_event_queue_thread_retries_and_exits | def test_process_event_queue_thread_retries_and_exits(fresh_deadline_config, mock_telemetry_client, http_code, attempt_count):"""Test that the thread exits cleanly after getting an unexpected exception"""# GIVENhttp_error = request.HTTPError("http://test.com", http_code, "Http Error", {}, None)# type: ignorequeue_mock ... | 1 | 14 | 4 | 102 | 2 | 172 | 189 | 172 | fresh_deadline_config,mock_telemetry_client,http_code,attempt_count | ['queue_mock', 'http_error'] | None | {"Assign": 6, "Expr": 2, "With": 1} | 8 | 18 | 8 | ["request.HTTPError", "MagicMock", "TelemetryEvent", "patch.object", "patch.object", "mock_telemetry_client._process_event_queue_thread", "pytest.mark.parametrize", "pytest.mark.timeout"] | 0 | [] | The function (test_process_event_queue_thread_retries_and_exits) defined within the public class called public.The function start at line 172 and ends at 189. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [172.0] and does not return any value. It declares 8.... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_process_event_queue_thread_handles_unexpected_error | def test_process_event_queue_thread_handles_unexpected_error(fresh_deadline_config, mock_telemetry_client):"""Test that the thread exits cleanly after getting an unexpected exception"""# GIVENqueue_mock = MagicMock()queue_mock.get.side_effect = [TelemetryEvent(), None]mock_telemetry_client.event_queue = queue_mock# WHE... | 1 | 10 | 2 | 68 | 1 | 193 | 206 | 193 | fresh_deadline_config,mock_telemetry_client | ['queue_mock'] | None | {"Assign": 3, "Expr": 3, "With": 1} | 7 | 14 | 7 | ["MagicMock", "TelemetryEvent", "patch.object", "Exception", "mock_telemetry_client._process_event_queue_thread", "urlopen_mock.assert_called_once", "pytest.mark.timeout"] | 0 | [] | The function (test_process_event_queue_thread_handles_unexpected_error) defined within the public class called public.The function start at line 193 and ends at 206. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [193.0] and does not return any value. It decl... |
aws-deadline_deadline-cloud | public | public | 0 | 0 | test_record_hashing_summary | def test_record_hashing_summary(fresh_deadline_config, mock_telemetry_client):"""Tests that recording a hashing summary sends the expected TelemetryEvent to the thread queue"""# GIVENqueue_mock = MagicMock()test_summary = SummaryStatistics(total_bytes=123, total_files=12, total_time=12345)expected_summary = asdict(test... | 1 | 16 | 2 | 104 | 4 | 209 | 230 | 209 | fresh_deadline_config,mock_telemetry_client | ['expected_event', 'queue_mock', 'expected_summary', 'test_summary'] | None | {"Assign": 7, "Expr": 3, "With": 1} | 8 | 22 | 8 | ["MagicMock", "SummaryStatistics", "asdict", "TelemetryEvent", "patch.object", "patch.object", "mock_telemetry_client.record_hashing_summary", "queue_mock.put_nowait.assert_called_once_with"] | 0 | [] | The function (test_record_hashing_summary) defined within the public class called public.The function start at line 209 and ends at 230. It contains 16 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [209.0] and does not return any value. It declares 8.0 functions, and It h... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.