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
assert_expected_files_on_s3.__inner_func__
def __inner_func__(bucket, expected_files):actual_files = set()for bucket_object in bucket.objects.all():actual_files.add(bucket_object.key)assert actual_files == expected_files
2
5
2
35
0
217
223
217
null
[]
None
null
0
0
0
null
0
null
The function (assert_expected_files_on_s3.__inner_func__) defined within the public class called public.The function start at line 217 and ends at 223. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [217.0] and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
assert_expected_files_on_s3
def assert_expected_files_on_s3():"""Assert that all provided files are in an S3 bucket."""def __inner_func__(bucket, expected_files):actual_files = set()for bucket_object in bucket.objects.all():actual_files.add(bucket_object.key)assert actual_files == expected_filesreturn __inner_func__
1
3
0
9
1
212
225
212
['actual_files']
Returns
{"Assign": 1, "Expr": 2, "For": 1, "Return": 1}
3
14
3
["set", "bucket.objects.all", "actual_files.add"]
8
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_attachments.test_asset_sync_py.TestAssetSync.test_sync_outputs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.un...
The function (assert_expected_files_on_s3) defined within the public class called public.The function start at line 212 and ends at 225. It contains 3 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 3.0 functions, It has 3.0...
aws-deadline_deadline-cloud
public
public
0
0
variables
def variables():return {"frame": 1,}
1
4
0
11
0
229
232
229
[]
Returns
{"Return": 1}
0
4
0
[]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3956605_inducer_pymbolic.test.test_pymbolic_py.test_mappers", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3956605_inducer_pymbolic.test.test_pymbolic_py.test_parser"]
The function (variables) defined within the public class called public.The function start at line 229 and ends at 232. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It has 2.0 functions calling this function which are ["...
aws-deadline_deadline-cloud
public
public
0
0
default_manifest_str_v2023_03_03
def default_manifest_str_v2023_03_03() -> str:manifest_file = os.path.abspath(os.path.join(os.path.dirname(__file__), "data", "manifest_v2023_03_03.json"))with open(manifest_file) as f:return f.read()
1
6
0
48
1
236
241
236
['manifest_file']
str
{"Assign": 1, "Return": 1, "With": 1}
5
6
5
["os.path.abspath", "os.path.join", "os.path.dirname", "open", "f.read"]
0
[]
The function (default_manifest_str_v2023_03_03) defined within the public class called public.The function start at line 236 and ends at 241. 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 h...
aws-deadline_deadline-cloud
public
public
0
0
farm_id
def farm_id():return "farm-1234567890abcdefghijklmnopqrstuv"
1
2
0
6
0
245
246
245
[]
Returns
{"Return": 1}
0
2
0
[]
0
[]
The function (farm_id) defined within the public class called public.The function start at line 245 and ends at 246. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
aws-deadline_deadline-cloud
public
public
0
0
queue_id
def queue_id():return "queue-01234567890123456789012345678901"
1
2
0
6
0
250
251
250
[]
Returns
{"Return": 1}
0
2
0
[]
0
[]
The function (queue_id) defined within the public class called public.The function start at line 250 and ends at 251. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
aws-deadline_deadline-cloud
public
public
0
0
job_id
def job_id():return "job-01234567890123456789012345678901"
1
2
0
6
0
255
256
255
[]
Returns
{"Return": 1}
0
2
0
[]
0
[]
The function (job_id) defined within the public class called public.The function start at line 255 and ends at 256. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
aws-deadline_deadline-cloud
public
public
0
0
session_action_id
def session_action_id():return "session-action-1"
1
2
0
6
0
260
261
260
[]
Returns
{"Return": 1}
0
2
0
[]
0
[]
The function (session_action_id) defined within the public class called public.The function start at line 260 and ends at 261. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
aws-deadline_deadline-cloud
public
public
0
0
fixture_default_job
def fixture_default_job(job_id, default_attachments):"""Fixture returning a job that can be used for most tests."""return Job(jobId=job_id,attachments=default_attachments,)
1
5
2
20
0
265
272
265
job_id,default_attachments
[]
Returns
{"Expr": 1, "Return": 1}
2
8
2
["Job", "pytest.fixture"]
0
[]
The function (fixture_default_job) defined within the public class called public.The function start at line 265 and ends at 272. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [265.0], and this function return a value. It declares 2.0 functions, and It has 2....
aws-deadline_deadline-cloud
public
public
0
0
fixture_vfs_job
def fixture_vfs_job(job_id, vfs_attachments):"""Fixture returning a job that can be used for most tests."""return Job(jobId=job_id,attachments=vfs_attachments,)
1
5
2
20
0
276
283
276
job_id,vfs_attachments
[]
Returns
{"Expr": 1, "Return": 1}
2
8
2
["Job", "pytest.fixture"]
0
[]
The function (fixture_vfs_job) defined within the public class called public.The function start at line 276 and ends at 283. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [276.0], and this function return a value. It declares 2.0 functions, and It has 2.0 fu...
aws-deadline_deadline-cloud
public
public
0
0
fixture_default_queue
def fixture_default_queue(farm_id, queue_id, default_job_attachment_s3_settings):"""Fixture returning a queue that can be used for most tests."""return Queue(displayName="queue_name",queueId=queue_id,farmId=farm_id,status="ENABLED",defaultBudgetAction="None",jobAttachmentSettings=default_job_attachment_s3_settings,)
1
9
3
38
0
287
298
287
farm_id,queue_id,default_job_attachment_s3_settings
[]
Returns
{"Expr": 1, "Return": 1}
2
12
2
["Queue", "pytest.fixture"]
0
[]
The function (fixture_default_queue) defined within the public class called public.The function start at line 287 and ends at 298. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [287.0], and this function return a value. It declares 2.0 functions, and It has ...
aws-deadline_deadline-cloud
public
public
0
0
create_get_queue_response._inner_func_
def _inner_func_(queue_info: Queue):response = dict(dataclasses.asdict(queue_info, dict_factory=lambda x: {k: v for (k, v) in x if v is not None}),**response_metadata,)response["createdAt"] = datetime.strptime("2023-07-13 14:35:26.123456", "%Y-%m-%d %H:%M:%S.%f")response["createdBy"] = "job attachments tests"response["...
3
13
1
73
0
307
321
307
null
[]
None
null
0
0
0
null
0
null
The function (create_get_queue_response._inner_func_) defined within the public class called public.The function start at line 307 and ends at 321. It contains 13 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
create_get_queue_response
def create_get_queue_response(response_metadata) -> Callable[[Queue], dict[str, Any]]:"""Fixture used to create get_queue responses"""def _inner_func_(queue_info: Queue):response = dict(dataclasses.asdict(queue_info, dict_factory=lambda x: {k: v for (k, v) in x if v is not None}),**response_metadata,)response["createdA...
1
3
1
24
1
302
323
302
response_metadata
['response']
Callable[[Queue], dict[str, Any]]
{"Assign": 4, "Expr": 1, "Return": 2}
4
22
4
["dict", "dataclasses.asdict", "datetime.strptime", "pytest.fixture"]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_attachments.aws.test_deadline_py.test_get_queue", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job...
The function (create_get_queue_response) defined within the public class called public.The function start at line 302 and ends at 323. 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 4.0 functions, It has 4.0 funct...
aws-deadline_deadline-cloud
public
public
0
0
create_get_job_response._inner_func_
def _inner_func_(job_info: Job):now = datetime.now()return dict(dataclasses.asdict(job_info, dict_factory=lambda x: {k: v for (k, v) in x if v is not None}),**{"jobId": job_info.jobId,"createdAt": now,"lifecycleStatus": "READY","createdBy": "CreatedBy","taskRunStatusCounts": {"READY": 1},"priority": 50,},**response_met...
3
16
1
86
0
332
347
332
null
[]
None
null
0
0
0
null
0
null
The function (create_get_job_response._inner_func_) defined within the public class called public.The function start at line 332 and ends at 347. It contains 16 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
create_get_job_response
def create_get_job_response(response_metadata) -> Callable[[Job], dict[str, Any]]:"""Fixture used to create get_job responses"""def _inner_func_(job_info: Job):now = datetime.now()return dict(dataclasses.asdict(job_info, dict_factory=lambda x: {k: v for (k, v) in x if v is not None}),**{"jobId": job_info.jobId,"created...
1
3
1
24
1
327
349
327
response_metadata
['now']
Callable[[Job], dict[str, Any]]
{"Assign": 1, "Expr": 1, "Return": 2}
4
23
4
["datetime.now", "dict", "dataclasses.asdict", "pytest.fixture"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_attachments.test_download_py.TestFullDownload.before_test"]
The function (create_get_job_response) defined within the public class called public.The function start at line 327 and ends at 349. 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 4.0 functions, It has 4.0 functio...
aws-deadline_deadline-cloud
public
public
0
0
fixture_response_metadata
def fixture_response_metadata():"""Fixture returning a ResponseMetadata to be included in get_queue, get_job response"""return {"ResponseMetadata": {"RequestId": "abc123","HTTPStatusCode": 200,"HostId": "abc123",}}
1
8
0
24
0
353
363
353
[]
Returns
{"Expr": 1, "Return": 1}
1
11
1
["pytest.fixture"]
0
[]
The function (fixture_response_metadata) defined within the public class called public.The function start at line 353 and ends at 363. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, and It has 1....
aws-deadline_deadline-cloud
public
public
0
0
fixture_test_manifest_one
def fixture_test_manifest_one():return {"hashAlg": "xxh128","manifestVersion": "2023-03-03","paths": [{"hash": "a96ddfc33590cd7d2391f1972f66a72a","mtime": 1111111111111111,"path": "a.txt","size": 2,},{"hash": "b96ddfc33590cd7d2391f1972f66a72a","mtime": 2222222222222222,"path": "b.txt","size": 4,},{"hash": "c96ddfc33590...
1
26
0
81
0
367
392
367
[]
Returns
{"Return": 1}
1
26
1
["pytest.fixture"]
0
[]
The function (fixture_test_manifest_one) defined within the public class called public.The function start at line 367 and ends at 392. It contains 26 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, and It has 1...
aws-deadline_deadline-cloud
public
public
0
0
fixture_test_manifest_two
def fixture_test_manifest_two():return {"hashAlg": "xxh128","manifestVersion": "2023-03-03","paths": [{"hash": "a20ddfc33590cd7d2391f1972f66a72a","mtime": 4444444444444444,"path": "a.txt","size": 20,},{"hash": "d96ddfc33590cd7d2391f1972f66a72a","mtime": 5555555555555555,"path": "d.txt","size": 40,},],"totalSize": 60,}
1
20
0
62
0
396
415
396
[]
Returns
{"Return": 1}
1
20
1
["pytest.fixture"]
0
[]
The function (fixture_test_manifest_two) defined within the public class called public.The function start at line 396 and ends at 415. It contains 20 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, and It has 1...
aws-deadline_deadline-cloud
public
public
0
0
fixture_merged_manifest
def fixture_merged_manifest():return {"hashAlg": "xxh128","manifestVersion": "2023-03-03","paths": [{"hash": "a20ddfc33590cd7d2391f1972f66a72a","mtime": 4444444444444444,"path": "a.txt","size": 20,},{"hash": "b96ddfc33590cd7d2391f1972f66a72a","mtime": 2222222222222222,"path": "b.txt","size": 4,},{"hash": "c96ddfc33590c...
1
32
0
100
0
419
450
419
[]
Returns
{"Return": 1}
1
32
1
["pytest.fixture"]
0
[]
The function (fixture_merged_manifest) defined within the public class called public.The function start at line 419 and ends at 450. It contains 32 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, and It has 1.0...
aws-deadline_deadline-cloud
public
public
0
0
fixture_really_big_manifest
def fixture_really_big_manifest():return {"hashAlg": "xxh128","manifestVersion": "2023-03-03","paths": [{"hash": "a20ddfc33590cd7d2391f1972f66a72a","mtime": 4444444444444444,"path": "a.txt","size": 100000000000000000,# 100 Petabytes},{"hash": "b96ddfc33590cd7d2391f1972f66a72a","mtime": 2222222222222222,"path": "b.txt",...
1
20
0
62
0
454
473
454
[]
Returns
{"Return": 1}
1
20
1
["pytest.fixture"]
0
[]
The function (fixture_really_big_manifest) defined within the public class called public.The function start at line 454 and ends at 473. It contains 20 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, and It has...
aws-deadline_deadline-cloud
public
public
0
0
has_posix_target_user
def has_posix_target_user() -> bool:"""Returns if the testing environment exported the env variables for doingcross-account posix target-user tests."""return (os.environ.get("DEADLINE_JOB_ATTACHMENT_TEST_SUDO_TARGET_USER") is not Noneand os.environ.get("DEADLINE_JOB_ATTACHMENT_TEST_SUDO_TARGET_GROUP") is not None)
2
5
0
33
0
476
483
476
[]
bool
{"Expr": 1, "Return": 1}
2
8
2
["os.environ.get", "os.environ.get"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_attachments.test_download_py.TestFullDownload.test_download_files_from_manifests_have_correct_group_posix"]
The function (has_posix_target_user) defined within the public class called public.The function start at line 476 and ends at 483. It contains 5 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 2.0 functions, It has 2.0 functions...
aws-deadline_deadline-cloud
public
public
0
0
has_posix_disjoint_user
def has_posix_disjoint_user() -> bool:"""Returns if the testing environment exported the env variables for doingcross-account posix disjoint-user tests."""return (os.environ.get("DEADLINE_JOB_ATTACHMENT_TEST_SUDO_DISJOINT_USER") is not Noneand os.environ.get("DEADLINE_JOB_ATTACHMENT_TEST_SUDO_DISJOINT_GROUP") is not No...
2
5
0
33
0
486
493
486
[]
bool
{"Expr": 1, "Return": 1}
2
8
2
["os.environ.get", "os.environ.get"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_attachments.test_download_py.TestFullDownload.test_download_files_from_manifests_have_correct_group_posix"]
The function (has_posix_disjoint_user) defined within the public class called public.The function start at line 486 and ends at 493. It contains 5 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 2.0 functions, It has 2.0 functio...
aws-deadline_deadline-cloud
public
public
0
0
posix_target_group
def posix_target_group() -> str:# Intentionally fail if the var is not defined.return os.environ["DEADLINE_JOB_ATTACHMENT_TEST_SUDO_TARGET_GROUP"]
1
2
0
13
0
497
499
497
[]
str
{"Return": 1}
1
3
1
["pytest.fixture"]
0
[]
The function (posix_target_group) defined within the public class called public.The function start at line 497 and ends at 499. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function ...
aws-deadline_deadline-cloud
public
public
0
0
posix_disjoint_group
def posix_disjoint_group() -> str:# Intentionally fail if the var is not defined.return os.environ["DEADLINE_JOB_ATTACHMENT_TEST_SUDO_DISJOINT_GROUP"]
1
2
0
13
0
503
505
503
[]
str
{"Return": 1}
1
3
1
["pytest.fixture"]
0
[]
The function (posix_disjoint_group) defined within the public class called public.The function start at line 503 and ends at 505. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 functio...
aws-deadline_deadline-cloud
public
public
0
0
test_glob_folder
def test_glob_folder() -> str:glob_data_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "data", "glob"))return glob_data_dir
1
3
0
36
1
509
511
509
['glob_data_dir']
str
{"Assign": 1, "Return": 1}
4
3
4
["os.path.abspath", "os.path.join", "os.path.dirname", "pytest.fixture"]
0
[]
The function (test_glob_folder) defined within the public class called public.The function start at line 509 and ends at 511. 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 4.0 functions, and It has 4.0 functions...
aws-deadline_deadline-cloud
public
public
0
0
glob_config_file
def glob_config_file() -> str:manifest_file = os.path.abspath(os.path.join(os.path.dirname(__file__), "data", "glob_config.txt"))return manifest_file
1
5
0
36
1
515
519
515
['manifest_file']
str
{"Assign": 1, "Return": 1}
4
5
4
["os.path.abspath", "os.path.join", "os.path.dirname", "pytest.fixture"]
0
[]
The function (glob_config_file) defined within the public class called public.The function start at line 515 and ends at 519. 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 4.0 functions, and It has 4.0 functions...
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
before_test
def before_test(self,request,create_s3_bucket,default_job_attachment_s3_settings: JobAttachmentS3Settings,default_asset_sync: AssetSync,):"""Setup the default queue and s3 bucket for all asset tests.Mark test with `no_setup` if you don't want this setup to run."""if "no_setup" in request.keywords:returncreate_s3_bucket...
2
11
5
40
0
49
64
49
self,request,create_s3_bucket,default_job_attachment_s3_settings,default_asset_sync
[]
None
{"Assign": 1, "Expr": 2, "If": 1, "Return": 1}
2
16
2
["create_s3_bucket", "pytest.fixture"]
0
[]
The function (before_test) defined within the public class called TestAssetSync.The function start at line 49 and ends at 64. It contains 11 lines of code and it has a cyclomatic complexity of 2. It takes 5 parameters, represented as [49.0] and does not return any value. It declares 2.0 functions, and It has 2.0 funct...
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
client
def client(self) -> MagicMock:return MagicMock()
1
2
1
11
0
67
68
67
self
[]
MagicMock
{"Return": 1}
1
2
1
["MagicMock"]
57
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3673636_bandwidth_python_bandwidth.tests.test_client_py.ClientTests.test_call_with_caching_client_class_name", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3673636_bandwidth_python_bandwidth.tests.test_client_py.Cl...
The function (client) defined within the public class called TestAssetSync.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. It declare 1.0 function, It has 1.0 function called insid...
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
asset_sync
def asset_sync(self, farm_id: str, client: MagicMock) -> AssetSync:asset_sync = AssetSync(farm_id)asset_sync.s3_uploader._s3 = clientreturn asset_sync
1
4
3
30
0
71
74
71
self,farm_id,client
[]
AssetSync
{"Assign": 2, "Return": 1}
1
4
1
["AssetSync"]
0
[]
The function (asset_sync) defined within the public class called TestAssetSync.The function start at line 71 and ends at 74. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [71.0] and does not return any value. It declare 1.0 function, and It has 1.0 function ...
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
test_sync_inputs_no_inputs_successful
def test_sync_inputs_no_inputs_successful(self,tmp_path: Path,default_queue: Queue,default_job: Job,attachments_no_inputs: Attachments,):"""Asserts that sync_inputs is successful when no required assets exist for the Job"""# GIVENdefault_job.attachments = attachments_no_inputssession_dir = str(tmp_path)dest_dir = "asse...
2
50
5
213
0
76
133
76
self,tmp_path,default_queue,default_job,attachments_no_inputs
[]
None
{"Assign": 8, "Expr": 1, "With": 1}
9
58
9
["str", "str", "Path", "patch", "DownloadSummaryStatistics", "patch", "MagicMock", "self.default_asset_sync.sync_inputs", "SummaryStatistics"]
0
[]
The function (test_sync_inputs_no_inputs_successful) defined within the public class called TestAssetSync.The function start at line 76 and ends at 133. It contains 50 lines of code and it has a cyclomatic complexity of 2. It takes 5 parameters, represented as [76.0] and does not return any value. It declares 9.0 funct...
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
test_sync_inputs_successful
def test_sync_inputs_successful(self,tmp_path: Path,default_queue: Queue,job_fixture_name: str,s3_settings_fixture_name: str,test_manifest_one: dict,request: pytest.FixtureRequest,):"""Asserts that a valid manifest can be processed to download attachments from S3"""# GIVENjob: Job = request.getfixturevalue(job_fixture_...
2
63
7
299
0
148
217
148
self,tmp_path,default_queue,job_fixture_name,s3_settings_fixture_name,test_manifest_one,request
[]
None
{"AnnAssign": 4, "Assign": 8, "Expr": 1, "With": 1}
20
70
20
["request.getfixturevalue", "request.getfixturevalue", "str", "str", "Path", "decode_manifest", "json.dumps", "PosixFileSystemPermissionSettings", "patch", "patch", "DownloadSummaryStatistics", "patch", "patch", "patch", "patch.object", "MagicMock", "MagicMock", "self.default_asset_sync.sync_inputs", "pytest.mark.param...
0
[]
The function (test_sync_inputs_successful) defined within the public class called TestAssetSync.The function start at line 148 and ends at 217. It contains 63 lines of code and it has a cyclomatic complexity of 2. It takes 7 parameters, represented as [148.0] and does not return any value. It declares 20.0 functions, a...
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
test_sync_inputs_404_error
def test_sync_inputs_404_error(self,tmp_path: Path,default_queue: Queue,job_fixture_name: str,s3_settings_fixture_name: str,test_manifest_one: dict,request: pytest.FixtureRequest,):"""Asserts that a specific error message is raised when getting 404 errors synching inputs"""# GIVENdownload_exception = JobAttachmentsS3Cl...
1
43
7
177
0
231
279
231
self,tmp_path,default_queue,job_fixture_name,s3_settings_fixture_name,test_manifest_one,request
[]
None
{"AnnAssign": 2, "Assign": 4, "Expr": 2, "With": 2}
13
49
13
["JobAttachmentsS3ClientError", "request.getfixturevalue", "decode_manifest", "json.dumps", "request.getfixturevalue", "patch", "patch", "patch", "pytest.raises", "self.default_asset_sync.sync_inputs", "str", "pytest.mark.parametrize", "pytest.mark.parametrize"]
0
[]
The function (test_sync_inputs_404_error) defined within the public class called TestAssetSync.The function start at line 231 and ends at 279. It contains 43 lines of code and it has a cyclomatic complexity of 1. It takes 7 parameters, represented as [231.0] and does not return any value. It declares 13.0 functions, an...
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
test_sync_inputs_with_step_dependencies
def test_sync_inputs_with_step_dependencies(self,tmp_path: Path,default_queue: Queue,default_job: Job,s3_settings_fixture_name: str,test_manifest_one: dict,request: pytest.FixtureRequest,):"""Asserts that input syncing is done correctly when step dependencies are provided."""# GIVENs3_settings: JobAttachmentS3Settings ...
2
53
7
263
0
287
347
287
self,tmp_path,default_queue,default_job,s3_settings_fixture_name,test_manifest_one,request
[]
None
{"AnnAssign": 1, "Assign": 10, "Expr": 1, "With": 1}
16
61
16
["request.getfixturevalue", "str", "str", "Path", "decode_manifest", "json.dumps", "patch", "patch", "DownloadSummaryStatistics", "patch", "patch", "patch.object", "MagicMock", "MagicMock", "self.default_asset_sync.sync_inputs", "pytest.mark.parametrize"]
0
[]
The function (test_sync_inputs_with_step_dependencies) defined within the public class called TestAssetSync.The function start at line 287 and ends at 347. It contains 53 lines of code and it has a cyclomatic complexity of 2. It takes 7 parameters, represented as [287.0] and does not return any value. It declares 16.0 ...
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
test_sync_inputs_with_step_dependencies_same_root_vfs_on_posix
def test_sync_inputs_with_step_dependencies_same_root_vfs_on_posix(self,tmp_path: Path,default_queue: Queue,vfs_job: Job,s3_settings_fixture_name: str,test_manifest_one: dict,test_manifest_two: dict,request: pytest.FixtureRequest,):"""Asserts that input syncing is done correctly when step dependencies are provided."""#...
2
75
8
357
0
355
438
355
self,tmp_path,default_queue,vfs_job,s3_settings_fixture_name,test_manifest_one,test_manifest_two,request
[]
None
{"AnnAssign": 3, "Assign": 9, "Expr": 3, "With": 1}
24
84
24
["request.getfixturevalue", "str", "str", "Path", "PosixFileSystemPermissionSettings", "decode_manifest", "json.dumps", "patch", "json.dumps", "patch", "DownloadSummaryStatistics", "patch", "patch", "patch", "patch", "patch", "patch", "patch", "patch", "MagicMock", "self.default_asset_sync.sync_inputs", "merge_manifest...
0
[]
The function (test_sync_inputs_with_step_dependencies_same_root_vfs_on_posix) defined within the public class called TestAssetSync.The function start at line 355 and ends at 438. It contains 75 lines of code and it has a cyclomatic complexity of 2. It takes 8 parameters, represented as [355.0] and does not return any v...
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
test_sync_inputs_no_space_left
def test_sync_inputs_no_space_left(self,tmp_path: Path,default_queue: Queue,job_fixture_name: str,s3_settings_fixture_name: str,really_big_manifest: dict,request: pytest.FixtureRequest,):"""Asserts that an AssetSyncError is thrown if there is not enough space left on the device to download all inputs."""# GIVENjob: Job...
1
50
7
233
0
452
508
452
self,tmp_path,default_queue,job_fixture_name,s3_settings_fixture_name,really_big_manifest,request
[]
None
{"AnnAssign": 4, "Assign": 4, "Expr": 2, "With": 2}
17
57
17
["request.getfixturevalue", "request.getfixturevalue", "decode_manifest", "json.dumps", "PosixFileSystemPermissionSettings", "patch", "patch", "DownloadSummaryStatistics", "patch", "patch.object", "MagicMock", "MagicMock", "pytest.raises", "self.default_asset_sync.sync_inputs", "str", "pytest.mark.parametrize", "pytest...
0
[]
The function (test_sync_inputs_no_space_left) defined within the public class called TestAssetSync.The function start at line 452 and ends at 508. It contains 50 lines of code and it has a cyclomatic complexity of 1. It takes 7 parameters, represented as [452.0] and does not return any value. It declares 17.0 functions...
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
test_sync_outputs
def test_sync_outputs(self,tmp_path: Path,default_queue: Queue,default_job: Job,session_action_id: str,s3_settings_fixture_name: str,attachments_fixture_name: str,expected_cas_prefix: str,expected_output_prefix: str,request: pytest.FixtureRequest,assert_expected_files_on_s3,assert_canonical_manifest,):"""Test that outp...
3
118
12
615
0
533
674
533
self,tmp_path,default_queue,default_job,session_action_id,s3_settings_fixture_name,attachments_fixture_name,expected_cas_prefix,expected_output_prefix,request,assert_expected_files_on_s3,assert_canonical_manifest
[]
None
{"AnnAssign": 2, "Assign": 26, "Expr": 9, "If": 1, "Try": 1, "With": 3}
45
142
45
["request.getfixturevalue", "request.getfixturevalue", "str", "Path", "joinpath", "Path", "joinpath", "Path", "joinpath", "Path", "resource", "boto3.Session", "s3.Bucket", "bucket.put_object", "s3.meta.client.head_object", "patch", "patch", "patch", "patch", "MagicMock", "parent.mkdir", "Path", "open", "test_file.write...
0
[]
The function (test_sync_outputs) defined within the public class called TestAssetSync.The function start at line 533 and ends at 674. It contains 118 lines of code and it has a cyclomatic complexity of 3. It takes 12 parameters, represented as [533.0] and does not return any value. It declares 45.0 functions, and It h...
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
test_is_file_within_directory
def test_is_file_within_directory(self, file_path, directory_path, expected):assert (self.default_asset_sync._is_file_within_directory(file_path, directory_path) == expected)
1
4
4
26
0
687
690
687
self,file_path,directory_path,expected
[]
None
{}
14
4
14
["self.default_asset_sync._is_file_within_directory", "pytest.mark.parametrize", "Path", "Path", "Path", "Path", "Path", "Path", "Path", "Path", "Path", "Path", "Path", "Path"]
0
[]
The function (test_is_file_within_directory) defined within the public class called TestAssetSync.The function start at line 687 and ends at 690. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [687.0] and does not return any value. It declares 14.0 functions, ...
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
test_is_file_within_directory_with_symlink
def test_is_file_within_directory_with_symlink(self, tmp_path: Path):"""Test the `_is_file_within_directory` method when dealing with symbolic links.Ensures that it correctly identifies whether the target file of the givensymlink is within the specified directory or not."""tmp_dir = tmp_path / "tmp_dir"tmp_dir.mkdir()#...
1
20
2
108
0
696
727
696
self,tmp_path
[]
None
{"Assign": 5, "Expr": 6}
11
32
11
["tmp_dir.mkdir", "inside_file_path.touch", "outside_file_path.touch", "os.symlink", "os.symlink", "symlink_path_inside.is_symlink", "symlink_path_outside.is_symlink", "self.default_asset_sync._is_file_within_directory", "self.default_asset_sync._is_file_within_directory", "pytest.mark.skipif", "is_windows_non_admin"]
0
[]
The function (test_is_file_within_directory_with_symlink) defined within the public class called TestAssetSync.The function start at line 696 and ends at 727. It contains 20 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [696.0] and does not return any value. It declares 11...
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
test_get_attachments_not_found_return_none
def test_get_attachments_not_found_return_none(self, job: Job, expected_settings: Optional[Attachments]):"""Tests that get_attachments returns the expected result if Job or settings are None"""with patch(f"{deadline.__package__}.job_attachments.asset_sync.get_job", side_effect=[job]):actual = self.default_asset_sync.ge...
1
6
3
48
0
733
739
733
self,job,expected_settings
[]
None
{"Assign": 1, "Expr": 1, "With": 1}
4
7
4
["patch", "self.default_asset_sync.get_attachments", "pytest.mark.parametrize", "Job"]
0
[]
The function (test_get_attachments_not_found_return_none) defined within the public class called TestAssetSync.The function start at line 733 and ends at 739. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [733.0] and does not return any value. It declares 4.0...
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
test_get_attachments_successful
def test_get_attachments_successful(self, default_job: Job, default_attachments: Optional[Attachments]):"""Tests that get_attachments returns the expected result"""with patch(f"{deadline.__package__}.job_attachments.asset_sync.get_job", side_effect=[default_job]):actual = self.default_asset_sync.get_attachments("test-f...
1
10
3
50
0
741
751
741
self,default_job,default_attachments
[]
None
{"Assign": 1, "Expr": 1, "With": 1}
2
11
2
["patch", "self.default_asset_sync.get_attachments"]
0
[]
The function (test_get_attachments_successful) defined within the public class called TestAssetSync.The function start at line 741 and ends at 751. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [741.0] and does not return any value. It declares 2.0 functions...
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
test_get_s3_settings_not_found_return_none
def test_get_s3_settings_not_found_return_none(self, queue: Queue, expected_settings: Optional[JobAttachmentS3Settings]):"""Tests that get_s3_settings returns the expected result if Queue or S3 settings are None"""with patch(f"{deadline.__package__}.job_attachments.asset_sync.get_queue", side_effect=[queue]):actual = s...
1
8
3
46
0
769
777
769
self,queue,expected_settings
[]
None
{"Assign": 1, "Expr": 1, "With": 1}
4
9
4
["patch", "self.default_asset_sync.get_s3_settings", "pytest.mark.parametrize", "Queue"]
0
[]
The function (test_get_s3_settings_not_found_return_none) defined within the public class called TestAssetSync.The function start at line 769 and ends at 777. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [769.0] and does not return any value. It declares 4.0...
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
test_get_s3_settings_successful
def test_get_s3_settings_successful(self,default_queue: Queue,default_job_attachment_s3_settings: Optional[JobAttachmentS3Settings],):"""Tests that get_s3_settings returns the expected result"""with patch(f"{deadline.__package__}.job_attachments.asset_sync.get_queue",side_effect=[default_queue],):actual = self.default_...
1
11
3
50
0
779
790
779
self,default_queue,default_job_attachment_s3_settings
[]
None
{"Assign": 1, "Expr": 1, "With": 1}
2
12
2
["patch", "self.default_asset_sync.get_s3_settings"]
0
[]
The function (test_get_s3_settings_successful) defined within the public class called TestAssetSync.The function start at line 779 and ends at 790. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [779.0] and does not return any value. It declares 2.0 functions...
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
test_sync_inputs_with_storage_profiles_path_mapping_rules
def test_sync_inputs_with_storage_profiles_path_mapping_rules(self,default_queue: Queue,default_job: Job,test_manifest_one: dict,tmp_path: Path,):"""Tests when a non-empty `storage_profiles_path_mapping_rules` is passed to `sync_inputs`.Check that, for input manifests with an `fileSystemLocationName`, if the root pathc...
1
71
5
315
0
792
874
792
self,default_queue,default_job,test_manifest_one,tmp_path
[]
None
{"Assign": 7, "Expr": 2, "With": 1}
17
83
17
["Attachments", "ManifestProperties", "ManifestProperties", "decode_manifest", "json.dumps", "str", "tmp_path.joinpath", "patch", "patch", "DownloadSummaryStatistics", "patch", "patch.object", "MagicMock", "MagicMock", "self.default_asset_sync.sync_inputs", "mock_download_files_from_manifests.assert_called_once_with", ...
0
[]
The function (test_sync_inputs_with_storage_profiles_path_mapping_rules) defined within the public class called TestAssetSync.The function start at line 792 and ends at 874. It contains 71 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [792.0] and does not return any value....
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
test_sync_inputs_successful_using_vfs_fallback
def test_sync_inputs_successful_using_vfs_fallback(self,tmp_path: Path,default_queue: Queue,job_fixture_name: str,s3_settings_fixture_name: str,test_manifest_one: dict,request: pytest.FixtureRequest,):"""Asserts that a valid manifest can be processed to download attachments from S3"""# GIVENjob: Job = request.getfixtur...
2
56
7
271
0
889
951
889
self,tmp_path,default_queue,job_fixture_name,s3_settings_fixture_name,test_manifest_one,request
[]
None
{"AnnAssign": 2, "Assign": 8, "Expr": 2, "With": 1}
21
63
21
["request.getfixturevalue", "request.getfixturevalue", "str", "str", "Path", "decode_manifest", "json.dumps", "patch", "patch", "DownloadSummaryStatistics", "patch", "patch", "patch", "patch", "patch.object", "MagicMock", "MagicMock", "self.default_asset_sync.sync_inputs", "mock_mount_vfs.assert_not_called", "pytest.ma...
0
[]
The function (test_sync_inputs_successful_using_vfs_fallback) defined within the public class called TestAssetSync.The function start at line 889 and ends at 951. It contains 56 lines of code and it has a cyclomatic complexity of 2. It takes 7 parameters, represented as [889.0] and does not return any value. It declare...
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
test_cleanup_session_vfs_terminate_called
def test_cleanup_session_vfs_terminate_called(self, tmp_path):with patch(f"{deadline.__package__}.job_attachments.asset_sync.VFSProcessManager.find_vfs",) as mock_find_vfs, patch(f"{deadline.__package__}.job_attachments.asset_sync.VFSProcessManager.kill_all_processes",):self.default_asset_sync.cleanup_session(session_d...
1
18
2
76
0
953
973
953
self,tmp_path
[]
None
{"Expr": 4, "With": 1}
6
21
6
["patch", "patch", "self.default_asset_sync.cleanup_session", "mock_find_vfs.assert_not_called", "self.default_asset_sync.cleanup_session", "mock_find_vfs.assert_called_once"]
0
[]
The function (test_cleanup_session_vfs_terminate_called) defined within the public class called TestAssetSync.The function start at line 953 and ends at 973. It contains 18 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [953.0] and does not return any value. It declares 6.0...
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
test_cleanup_session_virtual_witout_os_user_raises
def test_cleanup_session_virtual_witout_os_user_raises(self, tmp_path):self.default_asset_sync.cleanup_session(session_dir=tmp_path,file_system=JobAttachmentsFileSystem.COPIED,)with pytest.raises(VFSOSUserNotSetError):self.default_asset_sync.cleanup_session(session_dir=tmp_path,file_system=JobAttachmentsFileSystem.VIRT...
1
10
2
49
0
975
985
975
self,tmp_path
[]
None
{"Expr": 2, "With": 1}
3
11
3
["self.default_asset_sync.cleanup_session", "pytest.raises", "self.default_asset_sync.cleanup_session"]
0
[]
The function (test_cleanup_session_virtual_witout_os_user_raises) defined within the public class called TestAssetSync.The function start at line 975 and ends at 985. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [975.0] and does not return any value. It dec...
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
test_attachment_sync_inputs_no_inputs_successful
def test_attachment_sync_inputs_no_inputs_successful(self,tmp_path: Path,default_queue: Queue,default_job: Job,attachments_no_inputs: Attachments,):"""Asserts that sync_inputs is successful when no required assets exist for the Job"""# GIVENdefault_job.attachments = attachments_no_inputssession_dir = str(tmp_path)dest_...
2
52
5
215
0
987
1,044
987
self,tmp_path,default_queue,default_job,attachments_no_inputs
[]
None
{"Assign": 8, "Expr": 1, "With": 1}
9
58
9
["str", "str", "Path", "patch", "DownloadSummaryStatistics", "patch", "MagicMock", "self.default_asset_sync.attachment_sync_inputs", "SummaryStatistics"]
0
[]
The function (test_attachment_sync_inputs_no_inputs_successful) defined within the public class called TestAssetSync.The function start at line 987 and ends at 1044. It contains 52 lines of code and it has a cyclomatic complexity of 2. It takes 5 parameters, represented as [987.0] and does not return any value. It decl...
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
test_attachment_sync_inputs_successful
def test_attachment_sync_inputs_successful(self,tmp_path: Path,default_queue: Queue,job_fixture_name: str,s3_settings_fixture_name: str,test_manifest_one: dict,request: pytest.FixtureRequest,):"""Asserts that a valid manifest can be processed to download attachments from S3"""# GIVENjob: Job = request.getfixturevalue(j...
2
63
7
299
0
1,059
1,126
1,059
self,tmp_path,default_queue,job_fixture_name,s3_settings_fixture_name,test_manifest_one,request
[]
None
{"AnnAssign": 4, "Assign": 8, "Expr": 1, "With": 1}
20
68
20
["request.getfixturevalue", "request.getfixturevalue", "str", "str", "Path", "decode_manifest", "json.dumps", "PosixFileSystemPermissionSettings", "patch", "patch", "DownloadSummaryStatistics", "patch", "patch", "patch", "patch.object", "MagicMock", "MagicMock", "self.default_asset_sync.attachment_sync_inputs", "pytest...
0
[]
The function (test_attachment_sync_inputs_successful) defined within the public class called TestAssetSync.The function start at line 1059 and ends at 1126. It contains 63 lines of code and it has a cyclomatic complexity of 2. It takes 7 parameters, represented as [1059.0] and does not return any value. It declares 20....
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
test_attachment_sync_inputs_404_error
def test_attachment_sync_inputs_404_error(self,tmp_path: Path,default_queue: Queue,job_fixture_name: str,s3_settings_fixture_name: str,test_manifest_one: dict,request: pytest.FixtureRequest,):"""Asserts that a specific error message is raised when getting 404 errors synching inputs"""# GIVENdownload_exception = JobAtta...
1
43
7
177
0
1,140
1,186
1,140
self,tmp_path,default_queue,job_fixture_name,s3_settings_fixture_name,test_manifest_one,request
[]
None
{"AnnAssign": 2, "Assign": 4, "Expr": 2, "With": 2}
13
47
13
["JobAttachmentsS3ClientError", "request.getfixturevalue", "decode_manifest", "json.dumps", "request.getfixturevalue", "patch", "patch", "patch", "pytest.raises", "self.default_asset_sync.attachment_sync_inputs", "str", "pytest.mark.parametrize", "pytest.mark.parametrize"]
0
[]
The function (test_attachment_sync_inputs_404_error) defined within the public class called TestAssetSync.The function start at line 1140 and ends at 1186. It contains 43 lines of code and it has a cyclomatic complexity of 1. It takes 7 parameters, represented as [1140.0] and does not return any value. It declares 13.0...
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
test_attachment_sync_inputs_with_step_dependencies
def test_attachment_sync_inputs_with_step_dependencies(self,tmp_path: Path,default_queue: Queue,default_job: Job,s3_settings_fixture_name: str,test_manifest_one: dict,request: pytest.FixtureRequest,):"""Asserts that input syncing is done correctly when step dependencies are provided."""# GIVENs3_settings: JobAttachment...
2
53
7
263
0
1,194
1,251
1,194
self,tmp_path,default_queue,default_job,s3_settings_fixture_name,test_manifest_one,request
[]
None
{"AnnAssign": 1, "Assign": 10, "Expr": 1, "With": 1}
16
58
16
["request.getfixturevalue", "str", "str", "Path", "decode_manifest", "json.dumps", "patch", "patch", "DownloadSummaryStatistics", "patch", "patch", "patch.object", "MagicMock", "MagicMock", "self.default_asset_sync.attachment_sync_inputs", "pytest.mark.parametrize"]
0
[]
The function (test_attachment_sync_inputs_with_step_dependencies) defined within the public class called TestAssetSync.The function start at line 1194 and ends at 1251. It contains 53 lines of code and it has a cyclomatic complexity of 2. It takes 7 parameters, represented as [1194.0] and does not return any value. It ...
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
test_attachment_sync_inputs_with_step_dependencies_same_root_vfs_on_posix
def test_attachment_sync_inputs_with_step_dependencies_same_root_vfs_on_posix(self,tmp_path: Path,default_queue: Queue,vfs_job: Job,s3_settings_fixture_name: str,test_manifest_one: dict,test_manifest_two: dict,request: pytest.FixtureRequest,):"""Asserts that input syncing is done correctly when step dependencies are pr...
2
75
8
357
0
1,259
1,338
1,259
self,tmp_path,default_queue,vfs_job,s3_settings_fixture_name,test_manifest_one,test_manifest_two,request
[]
None
{"AnnAssign": 3, "Assign": 9, "Expr": 3, "With": 1}
24
80
24
["request.getfixturevalue", "str", "str", "Path", "PosixFileSystemPermissionSettings", "decode_manifest", "json.dumps", "patch", "json.dumps", "patch", "DownloadSummaryStatistics", "patch", "patch", "patch", "patch", "patch", "patch", "patch", "patch", "MagicMock", "self.default_asset_sync.attachment_sync_inputs", "mer...
0
[]
The function (test_attachment_sync_inputs_with_step_dependencies_same_root_vfs_on_posix) defined within the public class called TestAssetSync.The function start at line 1259 and ends at 1338. It contains 75 lines of code and it has a cyclomatic complexity of 2. It takes 8 parameters, represented as [1259.0] and does no...
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
test_attachment_sync_inputs_no_space_left
def test_attachment_sync_inputs_no_space_left(self,tmp_path: Path,default_queue: Queue,job_fixture_name: str,s3_settings_fixture_name: str,really_big_manifest: dict,request: pytest.FixtureRequest,):"""Asserts that an AssetSyncError is thrown if there is not enough space left on the device to download all inputs."""# GI...
1
50
7
233
0
1,352
1,407
1,352
self,tmp_path,default_queue,job_fixture_name,s3_settings_fixture_name,really_big_manifest,request
[]
None
{"AnnAssign": 4, "Assign": 4, "Expr": 2, "With": 2}
17
56
17
["request.getfixturevalue", "request.getfixturevalue", "decode_manifest", "json.dumps", "PosixFileSystemPermissionSettings", "patch", "patch", "DownloadSummaryStatistics", "patch", "patch.object", "MagicMock", "MagicMock", "pytest.raises", "self.default_asset_sync.attachment_sync_inputs", "str", "pytest.mark.parametriz...
0
[]
The function (test_attachment_sync_inputs_no_space_left) defined within the public class called TestAssetSync.The function start at line 1352 and ends at 1407. It contains 50 lines of code and it has a cyclomatic complexity of 1. It takes 7 parameters, represented as [1352.0] and does not return any value. It declares ...
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
test_aggregate_asset_root_manifests_and_write
def test_aggregate_asset_root_manifests_and_write(self,default_queue: Queue,default_job: Job,default_job_attachment_s3_settings: JobAttachmentS3Settings,test_manifest_one: dict,tmp_path: Path,):test_manifest = decode_manifest(json.dumps(test_manifest_one))dest_dir = "assetroot"default_job.attachments = Attachments(mani...
1
73
6
335
0
1,409
1,484
1,409
self,default_queue,default_job,default_job_attachment_s3_settings,test_manifest_one,tmp_path
[]
None
{"Assign": 8, "With": 1}
20
76
20
["decode_manifest", "json.dumps", "Attachments", "ManifestProperties", "ManifestProperties", "len", "tmp_path.joinpath", "patch", "patch", "patch", "patch", "self.default_asset_sync._aggregate_asset_root_manifests", "self.default_asset_sync.generate_dynamic_path_mapping", "self.default_asset_sync._check_and_write_local...
0
[]
The function (test_aggregate_asset_root_manifests_and_write) defined within the public class called TestAssetSync.The function start at line 1409 and ends at 1484. It contains 73 lines of code and it has a cyclomatic complexity of 1. It takes 6 parameters, represented as [1409.0] and does not return any value. It decla...
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
test_attachment_sync_inputs_with_storage_profiles_path_mapping_rules
def test_attachment_sync_inputs_with_storage_profiles_path_mapping_rules(self,default_queue: Queue,default_job: Job,test_manifest_one: dict,tmp_path: Path,):"""Tests when a non-empty `storage_profiles_path_mapping_rules` is passed to `sync_inputs`.Check that, for input manifests with an `fileSystemLocationName`, if the...
1
73
5
317
0
1,486
1,570
1,486
self,default_queue,default_job,test_manifest_one,tmp_path
[]
None
{"Assign": 7, "Expr": 2, "With": 1}
17
85
17
["Attachments", "ManifestProperties", "ManifestProperties", "decode_manifest", "json.dumps", "str", "tmp_path.joinpath", "patch", "patch", "DownloadSummaryStatistics", "patch", "patch.object", "MagicMock", "MagicMock", "self.default_asset_sync.attachment_sync_inputs", "mock_download_files_from_manifests.assert_called_o...
0
[]
The function (test_attachment_sync_inputs_with_storage_profiles_path_mapping_rules) defined within the public class called TestAssetSync.The function start at line 1486 and ends at 1570. It contains 73 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [1486.0] and does not ret...
aws-deadline_deadline-cloud
TestAssetSync
public
0
0
test_attachment_sync_inputs_successful_using_vfs_fallback
def test_attachment_sync_inputs_successful_using_vfs_fallback(self,tmp_path: Path,default_queue: Queue,job_fixture_name: str,s3_settings_fixture_name: str,test_manifest_one: dict,request: pytest.FixtureRequest,):"""Asserts that a valid manifest can be processed to download attachments from S3"""# GIVENjob: Job = reques...
2
56
7
271
0
1,585
1,647
1,585
self,tmp_path,default_queue,job_fixture_name,s3_settings_fixture_name,test_manifest_one,request
[]
None
{"AnnAssign": 2, "Assign": 8, "Expr": 2, "With": 1}
21
63
21
["request.getfixturevalue", "request.getfixturevalue", "str", "str", "Path", "decode_manifest", "json.dumps", "patch", "patch", "DownloadSummaryStatistics", "patch", "patch", "patch", "patch", "patch.object", "MagicMock", "MagicMock", "self.default_asset_sync.attachment_sync_inputs", "mock_mount_vfs.assert_not_called",...
0
[]
The function (test_attachment_sync_inputs_successful_using_vfs_fallback) defined within the public class called TestAssetSync.The function start at line 1585 and ends at 1647. It contains 56 lines of code and it has a cyclomatic complexity of 2. It takes 7 parameters, represented as [1585.0] and does not return any val...
aws-deadline_deadline-cloud
public
public
0
0
assert_download_task_output
def assert_download_task_output(s3_settings: JobAttachmentS3Settings,farm_id,queue_id,tmp_path: Path,expected_files: dict[str, List[Path]],expected_total_bytes: int,manifest_version: ManifestVersion,):"""Assert that the expected files are downloaded when download_job_output is called with a task id."""with patch(f"{dea...
1
34
7
139
3
188
229
188
s3_settings,farm_id,queue_id,tmp_path,expected_files,expected_total_bytes,manifest_version
['summary_statistics', 'output_downloader', 'mock_on_downloading_files']
None
{"Assign": 3, "Expr": 4, "With": 1}
9
42
9
["patch", "str", "tmp_path.resolve", "MagicMock", "OutputDownloader", "output_downloader.download_job_output", "check_expected_files_present", "check_manifest_version_v2023_mtime", "assert_progress_tracker_values"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_attachments.test_download_py.TestFullDownload.test_download_task_output", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_clou...
The function (assert_download_task_output) defined within the public class called public.The function start at line 188 and ends at 229. It contains 34 lines of code and it has a cyclomatic complexity of 1. It takes 7 parameters, represented as [188.0] and does not return any value. It declares 9.0 functions, It has 9....
aws-deadline_deadline-cloud
public
public
0
0
check_manifest_version_v2023_mtime
def check_manifest_version_v2023_mtime(manifest_version, tmp_path):# Ensure that all the files from the 2023-03-03 manifest have had the correct mtime set.if manifest_version == ManifestVersion.v2023_03_03:assert all(path.stat().st_mtime == 1234 for path in tmp_path.glob("**/*") if path.is_file())
4
3
2
42
0
232
235
232
manifest_version,tmp_path
[]
None
{"If": 1}
4
4
4
["all", "path.stat", "tmp_path.glob", "path.is_file"]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_attachments.test_download_py.assert_download_job_output", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.dead...
The function (check_manifest_version_v2023_mtime) defined within the public class called public.The function start at line 232 and ends at 235. It contains 3 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [232.0] and does not return any value. It declares 4.0 functions, It ...
aws-deadline_deadline-cloud
public
public
0
0
assert_download_step_output
def assert_download_step_output(s3_settings: JobAttachmentS3Settings,farm_id,queue_id,tmp_path: Path,expected_files: dict[str, List[Path]],expected_total_bytes: int,manifest_version: ManifestVersion,):"""Assert that the expected files are downloaded when download_job_output is called with a step id."""with patch(f"{dea...
1
34
7
139
3
238
279
238
s3_settings,farm_id,queue_id,tmp_path,expected_files,expected_total_bytes,manifest_version
['summary_statistics', 'output_downloader', 'mock_on_downloading_files']
None
{"Assign": 3, "Expr": 4, "With": 1}
9
42
9
["patch", "str", "tmp_path.resolve", "MagicMock", "OutputDownloader", "output_downloader.download_job_output", "check_expected_files_present", "check_manifest_version_v2023_mtime", "assert_progress_tracker_values"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_attachments.test_download_py.TestFullDownload.test_download_step_output", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_clou...
The function (assert_download_step_output) defined within the public class called public.The function start at line 238 and ends at 279. It contains 34 lines of code and it has a cyclomatic complexity of 1. It takes 7 parameters, represented as [238.0] and does not return any value. It declares 9.0 functions, It has 9....
aws-deadline_deadline-cloud
public
public
0
0
assert_download_job_output
def assert_download_job_output(s3_settings: JobAttachmentS3Settings,farm_id,queue_id,tmp_path: Path,expected_files: dict[str, List[Path]],expected_total_bytes: int,manifest_version: ManifestVersion,):"""Assert that the expected files are downloaded when download_job_output is called."""with patch(f"{deadline.__package_...
3
35
7
172
4
282
323
282
s3_settings,farm_id,queue_id,tmp_path,expected_files,expected_total_bytes,manifest_version
['summary_statistics', 'output_downloader', 'mock_on_downloading_files', 'expected_files_set']
None
{"Assign": 4, "Expr": 3, "With": 1}
14
42
14
["patch", "str", "tmp_path.resolve", "MagicMock", "OutputDownloader", "output_downloader.download_job_output", "union", "set", "expected_files.values", "set", "tmp_path.glob", "path.is_file", "check_manifest_version_v2023_mtime", "assert_progress_tracker_values"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_attachments.test_download_py.TestFullDownload.test_download_job_output", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud...
The function (assert_download_job_output) defined within the public class called public.The function start at line 282 and ends at 323. It contains 35 lines of code and it has a cyclomatic complexity of 3. It takes 7 parameters, represented as [282.0] and does not return any value. It declares 14.0 functions, It has 14...
aws-deadline_deadline-cloud
public
public
0
0
assert_download_files_in_directory
def assert_download_files_in_directory(s3_settings: JobAttachmentS3Settings,attachments: Attachments,farm_id: str,queue_id: str,directory_path: str,tmp_path: Path,expected_files: dict[str, List[Path]],expected_total_bytes: int,manifest_version: ManifestVersion,):"""Assert that the expected files are downloaded when dow...
1
34
9
149
2
326
365
326
s3_settings,attachments,farm_id,queue_id,directory_path,tmp_path,expected_files,expected_total_bytes,manifest_version
['summary_statistics', 'mock_on_downloading_files']
None
{"Assign": 2, "Expr": 3, "With": 1}
9
40
9
["patch", "str", "tmp_path.resolve", "MagicMock", "download_files_in_directory", "str", "tmp_path.resolve", "check_expected_files_present", "assert_progress_tracker_values"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_attachments.test_download_py.TestFullDownload.test_download_files_in_directory"]
The function (assert_download_files_in_directory) defined within the public class called public.The function start at line 326 and ends at 365. It contains 34 lines of code and it has a cyclomatic complexity of 1. It takes 9 parameters, represented as [326.0] and does not return any value. It declares 9.0 functions, It...
aws-deadline_deadline-cloud
public
public
0
0
check_expected_files_present
def check_expected_files_present(expected_files, tmp_path):# Ensure that only the expected files are there and no extras.expected_files_set = set().union(*expected_files.values())assert expected_files_set == set([path for path in tmp_path.glob("**/*") if path.is_file()])
3
3
2
46
1
368
371
368
expected_files,tmp_path
['expected_files_set']
None
{"Assign": 1}
6
4
6
["union", "set", "expected_files.values", "set", "tmp_path.glob", "path.is_file"]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_attachments.test_download_py.assert_download_files_in_directory", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.u...
The function (check_expected_files_present) defined within the public class called public.The function start at line 368 and ends at 371. It contains 3 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [368.0] and does not return any value. It declares 6.0 functions, It has 6....
aws-deadline_deadline-cloud
public
public
0
0
assert_progress_tracker_values
def assert_progress_tracker_values(manifest_version: ManifestVersion,summary_statistics: DownloadSummaryStatistics,expected_files: dict[str, List[Path]],expected_total_bytes: int,mock_on_downloading_files: MagicMock,):readable_total_input_bytes = human_readable_file_size(expected_total_bytes)expected_files_set = set()....
4
50
5
261
6
374
428
374
manifest_version,summary_statistics,expected_files,expected_total_bytes,mock_on_downloading_files
['expected_progress_message_part', 'actual_last_progress_report', 'expected_summary_statistics', 'file_counts_by_root_directory', 'readable_total_input_bytes', 'expected_files_set']
None
{"Assign": 9, "For": 1, "If": 1}
18
55
18
["human_readable_file_size", "union", "set", "expected_files.values", "len", "expected_files.items", "len", "DownloadSummaryStatistics", "len", "len", "len", "len", "DownloadSummaryStatistics", "len", "len", "fields", "getattr", "getattr"]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_attachments.test_download_py.assert_download_files_in_directory", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.u...
The function (assert_progress_tracker_values) defined within the public class called public.The function start at line 374 and ends at 428. It contains 50 lines of code and it has a cyclomatic complexity of 4. It takes 5 parameters, represented as [374.0] and does not return any value. It declares 18.0 functions, It ha...
aws-deadline_deadline-cloud
public
public
0
0
assert_download_job_output_with_task_id_and_no_step_id_throws_error
def assert_download_job_output_with_task_id_and_no_step_id_throws_error(s3_settings: JobAttachmentS3Settings, farm_id, queue_id):"""Assert a JobAttachmentError is thrown when a task id is provided but step id is not."""with pytest.raises(JobAttachmentsError):mock_on_downloading_files = MagicMock(return_value=True)outpu...
1
16
3
66
2
431
450
431
s3_settings,farm_id,queue_id
['output_downloader', 'mock_on_downloading_files']
None
{"Assign": 2, "Expr": 2, "With": 1}
4
20
4
["pytest.raises", "MagicMock", "OutputDownloader", "output_downloader.download_job_output"]
0
[]
The function (assert_download_job_output_with_task_id_and_no_step_id_throws_error) defined within the public class called public.The function start at line 431 and ends at 450. It contains 16 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [431.0] and does not return any val...
aws-deadline_deadline-cloud
public
public
0
0
assert_get_job_input_paths_by_asset_root
def assert_get_job_input_paths_by_asset_root(s3_settings: JobAttachmentS3Settings,attachments: Attachments,expected_files: dict[str, List[BaseManifestPath]],expected_total_bytes: int,manifest_version: ManifestVersion,):"""Assert that get_job_input_paths_by_asset_root returns a dict of (asset root, manifest path group) ...
2
33
5
154
2
453
489
453
s3_settings,attachments,expected_files,expected_total_bytes,manifest_version
['paths_by_root', 'total_bytes']
None
{"Assign": 2, "AugAssign": 1, "Expr": 1, "For": 1, "With": 1}
8
37
8
["patch", "ManifestPathGroup", "ManifestPathv2023_03_03", "get_job_input_paths_by_asset_root", "len", "len", "paths_by_root.items", "len"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_attachments.test_download_py.TestFullDownload.test_get_job_input_paths_by_asset_root"]
The function (assert_get_job_input_paths_by_asset_root) defined within the public class called public.The function start at line 453 and ends at 489. It contains 33 lines of code and it has a cyclomatic complexity of 2. It takes 5 parameters, represented as [453.0] and does not return any value. It declares 8.0 functio...
aws-deadline_deadline-cloud
public
public
0
0
assert_get_job_output_paths_by_asset_root
def assert_get_job_output_paths_by_asset_root(s3_settings: JobAttachmentS3Settings,farm_id: str,queue_id: str,expected_files: dict[str, List[BaseManifestPath]],expected_total_bytes: int,manifest_version: ManifestVersion,):"""Assert that get_job_output_paths_by_asset_root returns a list of (hash, path) pairs of all outp...
2
22
6
125
2
492
518
492
s3_settings,farm_id,queue_id,expected_files,expected_total_bytes,manifest_version
['paths_by_root', 'total_bytes']
None
{"Assign": 2, "AugAssign": 1, "Expr": 1, "For": 1, "With": 1}
6
27
6
["patch", "get_job_output_paths_by_asset_root", "len", "len", "paths_by_root.items", "len"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_attachments.test_download_py.TestFullDownload.test_get_job_output_paths_by_asset_root"]
The function (assert_get_job_output_paths_by_asset_root) defined within the public class called public.The function start at line 492 and ends at 518. It contains 22 lines of code and it has a cyclomatic complexity of 2. It takes 6 parameters, represented as [492.0] and does not return any value. It declares 6.0 functi...
aws-deadline_deadline-cloud
public
public
0
0
assert_get_job_output_paths_by_asset_root_when_no_asset_root_throws_error
def assert_get_job_output_paths_by_asset_root_when_no_asset_root_throws_error(farm_id: str,queue_id: str,s3_settings: JobAttachmentS3Settings,):"""Assert that get_job_output_paths_by_asset_root raises MissingAssetRootError when fail to get manifest."""with patch(f"{deadline.__package__}.job_attachments.download._get_as...
1
11
3
57
0
521
534
521
farm_id,queue_id,s3_settings
[]
None
{"Expr": 2, "With": 1}
4
14
4
["patch", "pytest.raises", "get_job_output_paths_by_asset_root", "str"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_attachments.test_download_py.TestFullDownload.test_get_job_outputs_paths_by_asset_root_when_no_asset_root"]
The function (assert_get_job_output_paths_by_asset_root_when_no_asset_root_throws_error) defined within the public class called public.The function start at line 521 and ends at 534. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [521.0] and does not return a...
aws-deadline_deadline-cloud
public
public
0
0
assert_get_job_input_output_paths_by_asset_root
def assert_get_job_input_output_paths_by_asset_root(s3_settings: JobAttachmentS3Settings,attachments: Attachments,farm_id: str,queue_id: str,expected_files: dict[str, List[BaseManifestPath]],expected_total_bytes: int,manifest_version: ManifestVersion,):"""Assert that get_job_input_output_paths_by_asset_root returns a l...
4
25
7
137
2
537
567
537
s3_settings,attachments,farm_id,queue_id,expected_files,expected_total_bytes,manifest_version
['paths_by_root', 'total_bytes']
None
{"Assign": 2, "AugAssign": 1, "Expr": 1, "For": 1, "If": 2, "With": 1}
6
31
6
["patch", "get_job_input_output_paths_by_asset_root", "len", "len", "paths_by_root.items", "len"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_attachments.test_download_py.TestFullDownload.test_get_job_input_output_paths_by_asset_root"]
The function (assert_get_job_input_output_paths_by_asset_root) defined within the public class called public.The function start at line 537 and ends at 567. It contains 25 lines of code and it has a cyclomatic complexity of 4. It takes 7 parameters, represented as [537.0] and does not return any value. It declares 6.0 ...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
before_test
def before_test(self,request,create_s3_bucket: Callable[[str], None],farm_id: str,queue_id: str,default_job_attachment_s3_settings: JobAttachmentS3Settings,default_queue: Queue,default_job: Job,create_get_queue_response: Callable[[Queue], dict[str, Any]],create_get_job_response: Callable[[Job], dict[str, Any]],manifest...
6
59
11
296
0
578
650
578
self,request,create_s3_bucket,farm_id,queue_id,default_job_attachment_s3_settings,default_queue,default_job,create_get_queue_response,create_get_job_response,manifest_version
[]
None
{"Assign": 7, "Expr": 9, "For": 4, "If": 1, "Return": 1}
23
73
23
["create_get_queue_response", "create_get_job_response", "create_s3_bucket", "resource", "boto3.Session", "s3.Bucket", "range", "bucket.upload_fileobj", "BytesIO", "range", "bucket.upload_fileobj", "BytesIO", "bucket.upload_fileobj", "BytesIO", "bucket.upload_fileobj", "BytesIO", "bucket.upload_fileobj", "BytesIO", "bu...
0
[]
The function (before_test) defined within the public class called TestFullDownload.The function start at line 578 and ends at 650. It contains 59 lines of code and it has a cyclomatic complexity of 6. It takes 11 parameters, represented as [578.0] and does not return any value. It declares 23.0 functions, and It has 2...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_get_job_input_paths_by_asset_root
def test_get_job_input_paths_by_asset_root(self, manifest_version: ManifestVersion):assert self.job.attachments is not Noneassert_get_job_input_paths_by_asset_root(self.job_attachment_settings,self.job.attachments,{"/tmp": self.INPUT_MANIFEST_VERSION_TO_ASSET_ROOT_PATHS[manifest_version]},5,manifest_version,)
1
9
2
46
0
669
677
669
self,manifest_version
[]
None
{"Expr": 1}
1
9
1
["assert_get_job_input_paths_by_asset_root"]
0
[]
The function (test_get_job_input_paths_by_asset_root) defined within the public class called TestFullDownload.The function start at line 669 and ends at 677. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [669.0] and does not return any value. It declare 1.0 f...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_get_job_output_paths_by_asset_root
def test_get_job_output_paths_by_asset_root(self, farm_id, queue_id, manifest_version: ManifestVersion):assert_get_job_output_paths_by_asset_root(self.job_attachment_settings,farm_id,queue_id,{"/test": self.MANIFEST_VERSION_TO_ASSET_ROOT_PATHS[manifest_version]},14,manifest_version,)
1
11
4
39
0
700
710
700
self,farm_id,queue_id,manifest_version
[]
None
{"Expr": 1}
1
11
1
["assert_get_job_output_paths_by_asset_root"]
0
[]
The function (test_get_job_output_paths_by_asset_root) defined within the public class called TestFullDownload.The function start at line 700 and ends at 710. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [700.0] and does not return any value. It declare 1.0...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_get_job_outputs_paths_by_asset_root_when_no_asset_root
def test_get_job_outputs_paths_by_asset_root_when_no_asset_root(self, farm_id, queue_id):assert_get_job_output_paths_by_asset_root_when_no_asset_root_throws_error(farm_id, queue_id, self.job_attachment_settings)
1
4
3
19
0
712
715
712
self,farm_id,queue_id
[]
None
{"Expr": 1}
1
4
1
["assert_get_job_output_paths_by_asset_root_when_no_asset_root_throws_error"]
0
[]
The function (test_get_job_outputs_paths_by_asset_root_when_no_asset_root) defined within the public class called TestFullDownload.The function start at line 712 and ends at 715. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [712.0] and does not return any va...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_get_job_input_output_paths_by_asset_root
def test_get_job_input_output_paths_by_asset_root(self, farm_id, queue_id, manifest_version: ManifestVersion):assert self.job.attachments is not Noneassert_get_job_input_output_paths_by_asset_root(self.job_attachment_settings,self.job.attachments,farm_id,queue_id,{"/tmp": self.INPUT_MANIFEST_VERSION_TO_ASSET_ROOT_PATHS...
1
16
4
62
0
717
732
717
self,farm_id,queue_id,manifest_version
[]
None
{"Expr": 1}
1
16
1
["assert_get_job_input_output_paths_by_asset_root"]
0
[]
The function (test_get_job_input_output_paths_by_asset_root) defined within the public class called TestFullDownload.The function start at line 717 and ends at 732. It contains 16 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [717.0] and does not return any value. It decla...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_download_files_from_manifests_with_fs_permission_settings_posix
def test_download_files_from_manifests_with_fs_permission_settings_posix(self,tmp_path: Path,manifest_version: ManifestVersion,):"""Tests whether the files listed in the given manifest are downloaded correctly from theS3 bucket. Also, verifies that the functions for changing file ownership and permissions(i.e., chown &...
9
44
3
271
0
758
818
758
self,tmp_path,manifest_version
[]
None
{"Assign": 12, "Expr": 1, "With": 1}
25
61
25
["manifests.decode", "decode_manifest", "str", "PosixFileSystemPermissionSettings", "MagicMock", "patch", "patch", "download_files_from_manifests", "self.job_attachment_settings.full_cas_prefix", "str", "call", "str", "Counter", "Counter", "str", "call", "path.stat", "str", "Counter", "Counter", "set", "set", "tmp_path...
0
[]
The function (test_download_files_from_manifests_with_fs_permission_settings_posix) defined within the public class called TestFullDownload.The function start at line 758 and ends at 818. It contains 44 lines of code and it has a cyclomatic complexity of 9. It takes 3 parameters, represented as [758.0] and does not ret...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_download_files_from_manifests_with_fs_permission_settings_windows
def test_download_files_from_manifests_with_fs_permission_settings_windows(self,tmp_path: Path,manifest_version: ManifestVersion,):"""Tests whether the files listed in the given manifest are downloaded correctly from theS3 bucket. Also, verifies that the function for changing file ownership and permissionsis correctly ...
7
51
3
222
0
824
890
824
self,tmp_path,manifest_version
[]
None
{"Assign": 10, "Expr": 1, "With": 1}
19
67
19
["manifests.decode", "decode_manifest", "str", "WindowsFileSystemPermissionSettings", "MagicMock", "patch", "download_files_from_manifests", "self.job_attachment_settings.full_cas_prefix", "str", "call", "str", "str", "Counter", "Counter", "set", "set", "tmp_path.glob", "path.is_file", "pytest.mark.skipif"]
0
[]
The function (test_download_files_from_manifests_with_fs_permission_settings_windows) defined within the public class called TestFullDownload.The function start at line 824 and ends at 890. It contains 51 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [824.0] and does not r...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_download_files_from_manifests_have_correct_group_posix
def test_download_files_from_manifests_have_correct_group_posix(self,tmp_path: Path,manifest_version: ManifestVersion,posix_target_group: str,posix_disjoint_group: str,):"""Tests whether the file system ownership and permissions of the downloaded filesare correctly changed on POSIX-based environment."""import grp# Crea...
5
51
5
285
0
900
973
900
self,tmp_path,manifest_version,posix_target_group,posix_disjoint_group
[]
None
{"Assign": 12, "Expr": 4, "For": 3, "With": 2}
24
74
24
["mkdir", "Path", "open", "str", "f.write", "manifests.decode", "decode_manifest", "str", "PosixFileSystemPermissionSettings", "MagicMock", "download_files_from_manifests", "self.job_attachment_settings.full_cas_prefix", "os.stat", "str", "grp.getgrgid", "pytest.raises", "shutil.chown", "grp.getgrgid", "os.stat", "str"...
0
[]
The function (test_download_files_from_manifests_have_correct_group_posix) defined within the public class called TestFullDownload.The function start at line 900 and ends at 973. It contains 51 lines of code and it has a cyclomatic complexity of 5. It takes 5 parameters, represented as [900.0] and does not return any v...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_download_files_from_manifests_have_correct_group_windows
def test_download_files_from_manifests_have_correct_group_windows(self,tmp_path: Path,manifest_version: ManifestVersion,):"""Tests whether the file system ownership and permissions of the downloaded filesare correctly changed on Windows environment."""import win32securityimport ntsecuritycon# Creates some files in the ...
6
55
3
314
0
979
1,053
979
self,tmp_path,manifest_version
[]
None
{"AnnAssign": 1, "Assign": 15, "Expr": 3, "For": 3, "If": 1, "With": 1}
21
75
21
["mkdir", "Path", "open", "str", "f.write", "manifests.decode", "decode_manifest", "str", "WindowsFileSystemPermissionSettings", "MagicMock", "download_files_from_manifests", "self.job_attachment_settings.full_cas_prefix", "win32security.GetFileSecurity", "str", "sd.GetSecurityDescriptorDacl", "range", "dacl.GetAceCoun...
0
[]
The function (test_download_files_from_manifests_have_correct_group_windows) defined within the public class called TestFullDownload.The function start at line 979 and ends at 1053. It contains 55 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [979.0] and does not return an...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_download_task_output
def test_download_task_output(self, farm_id, queue_id, tmp_path: Path, manifest_version: ManifestVersion):assert_download_task_output(self.job_attachment_settings,farm_id,queue_id,tmp_path,expected_files={str(tmp_path): [tmp_path / "test1.txt",tmp_path / "test" / "test2.txt",tmp_path / "test" / "test3.txt",tmp_path / "...
1
19
5
70
0
1,055
1,073
1,055
self,farm_id,queue_id,tmp_path,manifest_version
[]
None
{"Expr": 1}
2
19
2
["assert_download_task_output", "str"]
0
[]
The function (test_download_task_output) defined within the public class called TestFullDownload.The function start at line 1055 and ends at 1073. It contains 19 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [1055.0] and does not return any value. It declares 2.0 functions...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_download_step_output
def test_download_step_output(self, farm_id, queue_id, tmp_path: Path, manifest_version: ManifestVersion):assert_download_step_output(self.job_attachment_settings,farm_id,queue_id,tmp_path,expected_files={str(tmp_path): [tmp_path / "test1.txt",tmp_path / "test" / "test2.txt",tmp_path / "test" / "test3.txt",tmp_path / "...
1
23
5
90
0
1,075
1,097
1,075
self,farm_id,queue_id,tmp_path,manifest_version
[]
None
{"Expr": 1}
2
23
2
["assert_download_step_output", "str"]
0
[]
The function (test_download_step_output) defined within the public class called TestFullDownload.The function start at line 1075 and ends at 1097. It contains 23 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [1075.0] and does not return any value. It declares 2.0 functions...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_download_job_output
def test_download_job_output(self, farm_id, queue_id, tmp_path: Path, manifest_version: ManifestVersion):assert_download_job_output(self.job_attachment_settings,farm_id,queue_id,tmp_path,expected_files={str(tmp_path): [tmp_path / "test1.txt",tmp_path / "test" / "test2.txt",tmp_path / "test" / "test3.txt",tmp_path / "te...
1
29
5
120
0
1,099
1,127
1,099
self,farm_id,queue_id,tmp_path,manifest_version
[]
None
{"Expr": 1}
2
29
2
["assert_download_job_output", "str"]
0
[]
The function (test_download_job_output) defined within the public class called TestFullDownload.The function start at line 1099 and ends at 1127. It contains 29 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [1099.0] and does not return any value. It declares 2.0 functions,...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_download_files_in_directory
def test_download_files_in_directory(self, farm_id, queue_id, tmp_path: Path, manifest_version: ManifestVersion):assert self.job.attachments is not Noneassert_download_files_in_directory(self.job_attachment_settings,self.job.attachments,farm_id,queue_id,"test",tmp_path,expected_files={str(tmp_path): [tmp_path / "test" ...
1
25
5
109
0
1,129
1,153
1,129
self,farm_id,queue_id,tmp_path,manifest_version
[]
None
{"Expr": 1}
2
25
2
["assert_download_files_in_directory", "str"]
0
[]
The function (test_download_files_in_directory) defined within the public class called TestFullDownload.The function start at line 1129 and ends at 1153. It contains 25 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [1129.0] and does not return any value. It declares 2.0 fu...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_OutputDownloader_get_output_paths_by_root
def test_OutputDownloader_get_output_paths_by_root(self,farm_id,queue_id,tmp_path: Path,):with patch(f"{deadline.__package__}.job_attachments.download._get_asset_root_from_metadata",return_value=str(tmp_path.resolve()),):output_downloader = OutputDownloader(s3_settings=self.job_attachment_settings,farm_id=farm_id,queue...
1
36
4
112
0
1,155
1,191
1,155
self,farm_id,queue_id,tmp_path
[]
None
{"Assign": 1, "With": 1}
7
37
7
["patch", "str", "tmp_path.resolve", "OutputDownloader", "output_downloader.get_output_paths_by_root", "str", "tmp_path.resolve"]
0
[]
The function (test_OutputDownloader_get_output_paths_by_root) defined within the public class called TestFullDownload.The function start at line 1155 and ends at 1191. It contains 36 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [1155.0] and does not return any value. It d...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_OutputDownloader_set_root_path
def test_OutputDownloader_set_root_path(self, farm_id, queue_id, tmp_path: Path):with patch(f"{deadline.__package__}.job_attachments.download._get_asset_root_from_metadata",return_value=str(tmp_path.resolve()),):output_downloader = OutputDownloader(s3_settings=self.job_attachment_settings,farm_id=farm_id,queue_id=queue...
2
35
4
134
0
1,193
1,230
1,193
self,farm_id,queue_id,tmp_path
[]
None
{"Assign": 2, "Expr": 1, "With": 1}
8
38
8
["patch", "str", "tmp_path.resolve", "OutputDownloader", "output_downloader.set_root_path", "str", "tmp_path.resolve", "output_downloader.get_output_paths_by_root"]
0
[]
The function (test_OutputDownloader_set_root_path) defined within the public class called TestFullDownload.The function start at line 1193 and ends at 1230. It contains 35 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [1193.0] and does not return any value. It declares 8.0...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_OutputDownloader_set_root_path_with_symlinks
def test_OutputDownloader_set_root_path_with_symlinks(self, farm_id, queue_id, tmp_path: Path):"""Test that when a symlink path containing '..' is used as a new root. Withoutresolving the symlink target, the absolute path with ".." removed is stored."""with patch(f"{deadline.__package__}.job_attachments.download._get_a...
1
29
4
151
0
1,236
1,270
1,236
self,farm_id,queue_id,tmp_path
[]
None
{"Assign": 3, "Expr": 5, "With": 1}
15
35
15
["patch", "str", "tmp_path.resolve", "OutputDownloader", "target_path.mkdir", "sym_path.parent.mkdir", "sym_path.symlink_to", "output_downloader.set_root_path", "str", "tmp_path.resolve", "str", "output_downloader.get_output_paths_by_root", "str", "pytest.mark.skipif", "is_windows_non_admin"]
0
[]
The function (test_OutputDownloader_set_root_path_with_symlinks) defined within the public class called TestFullDownload.The function start at line 1236 and ends at 1270. It contains 29 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [1236.0] and does not return any value. I...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_OutputDownloader_set_root_path_wrong_root_throws_exception
def test_OutputDownloader_set_root_path_wrong_root_throws_exception(self, farm_id, queue_id, tmp_path: Path):"""Assert a ValueError is thrown when given a non-existent root path."""with patch(f"{deadline.__package__}.job_attachments.download._get_asset_root_from_metadata",return_value=str(tmp_path.resolve()),):output_d...
1
17
4
84
0
1,272
1,292
1,272
self,farm_id,queue_id,tmp_path
[]
None
{"Assign": 1, "Expr": 2, "With": 2}
6
21
6
["patch", "str", "tmp_path.resolve", "OutputDownloader", "pytest.raises", "output_downloader.set_root_path"]
0
[]
The function (test_OutputDownloader_set_root_path_wrong_root_throws_exception) defined within the public class called TestFullDownload.The function start at line 1272 and ends at 1292. It contains 17 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [1272.0] and does not retur...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_OutputDownloader_download_job_output_when_skip
def test_OutputDownloader_download_job_output_when_skip(self, farm_id, queue_id, tmp_path: Path):"""When path conflicts occur during file download and the resolution method is set to SKIP,test whether the files has actually been skipped.Note: This test relies on `st_ctime` for checking if a file has been skipped. On Li...
6
14
4
106
0
1,294
1,321
1,294
self,farm_id,queue_id,tmp_path
[]
None
{"Assign": 3, "Expr": 2, "If": 1}
8
28
8
["self.download_outputs_check_expected_files_exist", "path.stat", "output_downloader.download_job_output", "set", "set", "tmp_path.glob", "path.is_file", "path.stat"]
0
[]
The function (test_OutputDownloader_download_job_output_when_skip) defined within the public class called TestFullDownload.The function start at line 1294 and ends at 1321. It contains 14 lines of code and it has a cyclomatic complexity of 6. It takes 4 parameters, represented as [1294.0] and does not return any value....
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
download_outputs_check_expected_files_exist
def download_outputs_check_expected_files_exist(self, farm_id, queue_id, tmp_path):expected_files = [tmp_path / "test1.txt",tmp_path / "test" / "test2.txt",tmp_path / "test" / "test3.txt",tmp_path / "test4.txt",tmp_path / "test13.txt",tmp_path / "test" / "test14.txt",tmp_path / "test5.txt",tmp_path / "test" / "test6.tx...
3
34
4
171
0
1,323
1,358
1,323
self,farm_id,queue_id,tmp_path
[]
Returns
{"Assign": 2, "Expr": 1, "Return": 1, "With": 1}
9
36
9
["patch", "str", "tmp_path.resolve", "OutputDownloader", "output_downloader.download_job_output", "set", "set", "tmp_path.glob", "path.is_file"]
0
[]
The function (download_outputs_check_expected_files_exist) defined within the public class called TestFullDownload.The function start at line 1323 and ends at 1358. It contains 34 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [1323.0], and this function return a value. It ...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_OutputDownloader_download_job_output_when_overwrite
def test_OutputDownloader_download_job_output_when_overwrite(self, farm_id, queue_id, tmp_path: Path):"""When path conflicts occur during file download and the resolution method is set to OVERWRITE,test whether the files has actually been overwritten.Note: This test relies on `st_ctime` for checking if a file has been ...
7
19
4
118
0
1,360
1,391
1,360
self,farm_id,queue_id,tmp_path
[]
None
{"Assign": 3, "Expr": 2, "For": 1, "If": 1}
9
32
9
["self.download_outputs_check_expected_files_exist", "path.stat", "output_downloader.download_job_output", "set", "set", "tmp_path.glob", "path.is_file", "path.stat", "zip"]
0
[]
The function (test_OutputDownloader_download_job_output_when_overwrite) defined within the public class called TestFullDownload.The function start at line 1360 and ends at 1391. It contains 19 lines of code and it has a cyclomatic complexity of 7. It takes 4 parameters, represented as [1360.0] and does not return any v...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_OutputDownloader_download_job_output_when_create_copy
def test_OutputDownloader_download_job_output_when_create_copy(self, farm_id, queue_id, tmp_path: Path):expected_files = [tmp_path / "test1.txt",tmp_path / "test" / "test2.txt",tmp_path / "test" / "test3.txt",tmp_path / "test4.txt",tmp_path / "test13.txt",tmp_path / "test" / "test14.txt",tmp_path / "test5.txt",tmp_path...
5
58
4
286
0
1,393
1,456
1,393
self,farm_id,queue_id,tmp_path
[]
None
{"Assign": 3, "Expr": 3, "With": 1}
15
64
15
["expected_files_after_create_copy.extend", "patch", "str", "tmp_path.resolve", "OutputDownloader", "output_downloader.download_job_output", "set", "set", "tmp_path.glob", "path.is_file", "output_downloader.download_job_output", "set", "set", "tmp_path.glob", "path.is_file"]
0
[]
The function (test_OutputDownloader_download_job_output_when_create_copy) defined within the public class called TestFullDownload.The function start at line 1393 and ends at 1456. It contains 58 lines of code and it has a cyclomatic complexity of 5. It takes 4 parameters, represented as [1393.0] and does not return any...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_OutputDownloader_download_job_output_unknown_resolution_throws_exception
def test_OutputDownloader_download_job_output_unknown_resolution_throws_exception(self, farm_id, queue_id, tmp_path: Path):with patch(f"{deadline.__package__}.job_attachments.download._get_asset_root_from_metadata",return_value=str(tmp_path.resolve()),):output_downloader = OutputDownloader(s3_settings=self.job_attachme...
1
20
4
87
0
1,458
1,478
1,458
self,farm_id,queue_id,tmp_path
[]
None
{"Assign": 1, "Expr": 2, "With": 2}
8
21
8
["patch", "str", "tmp_path.resolve", "OutputDownloader", "output_downloader.download_job_output", "pytest.raises", "output_downloader.download_job_output", "FileConflictResolution"]
0
[]
The function (test_OutputDownloader_download_job_output_unknown_resolution_throws_exception) defined within the public class called TestFullDownload.The function start at line 1458 and ends at 1478. It contains 20 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [1458.0] and ...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_OutputDownloader_download_job_output_to_new_asset_root
def test_OutputDownloader_download_job_output_to_new_asset_root(self, farm_id, queue_id, tmp_path: Path):expected_files = [tmp_path / "test1.txt",tmp_path / "test" / "test2.txt",tmp_path / "test" / "test3.txt",tmp_path / "test4.txt",tmp_path / "test13.txt",tmp_path / "test" / "test14.txt",tmp_path / "test5.txt",tmp_pat...
3
36
4
177
0
1,480
1,517
1,480
self,farm_id,queue_id,tmp_path
[]
None
{"Assign": 2, "Expr": 2, "With": 1}
10
38
10
["patch", "OutputDownloader", "output_downloader.set_root_path", "str", "tmp_path.resolve", "output_downloader.download_job_output", "set", "set", "tmp_path.glob", "path.is_file"]
0
[]
The function (test_OutputDownloader_download_job_output_to_new_asset_root) defined within the public class called TestFullDownload.The function start at line 1480 and ends at 1517. It contains 36 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [1480.0] and does not return an...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_OutputDownloader_download_job_output_posix_invalid_file_path_fails
def test_OutputDownloader_download_job_output_posix_invalid_file_path_fails(self, farm_id, queue_id, outputs_by_root: dict[str, ManifestPathGroup]):self.create_output_downloaded_and_validate_path(farm_id, outputs_by_root, queue_id)
1
4
4
28
0
1,574
1,577
1,574
self,farm_id,queue_id,outputs_by_root
[]
None
{"Expr": 1}
11
4
11
["self.create_output_downloaded_and_validate_path", "pytest.mark.skipif", "pytest.mark.parametrize", "ManifestPathGroup", "ManifestPathv2023_03_03", "ManifestPathGroup", "ManifestPathv2023_03_03", "ManifestPathGroup", "ManifestPathv2023_03_03", "ManifestPathGroup", "ManifestPathv2023_03_03"]
0
[]
The function (test_OutputDownloader_download_job_output_posix_invalid_file_path_fails) defined within the public class called TestFullDownload.The function start at line 1574 and ends at 1577. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [1574.0] and does no...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
create_output_downloaded_and_validate_path
def create_output_downloaded_and_validate_path(self, farm_id, outputs_by_root, queue_id):with patch(f"{deadline.__package__}.job_attachments.download.get_job_output_paths_by_asset_root",return_value=outputs_by_root,):output_downloader = OutputDownloader(s3_settings=self.job_attachment_settings,farm_id=farm_id,queue_id=...
1
17
4
82
0
1,579
1,595
1,579
self,farm_id,outputs_by_root,queue_id
[]
None
{"Assign": 1, "Expr": 1, "With": 2}
5
17
5
["patch", "OutputDownloader", "patch", "pytest.raises", "output_downloader.download_job_output"]
0
[]
The function (create_output_downloaded_and_validate_path) defined within the public class called TestFullDownload.The function start at line 1579 and ends at 1595. It contains 17 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [1579.0] and does not return any value. It decla...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_OutputDownloader_download_job_output_windows_invalid_file_path_fails
def test_OutputDownloader_download_job_output_windows_invalid_file_path_fails(self, farm_id, queue_id, outputs_by_root: dict[str, ManifestPathGroup]):self.create_output_downloaded_and_validate_path(farm_id, outputs_by_root, queue_id)
1
4
4
28
0
1,652
1,655
1,652
self,farm_id,queue_id,outputs_by_root
[]
None
{"Expr": 1}
11
4
11
["self.create_output_downloaded_and_validate_path", "pytest.mark.skipif", "pytest.mark.parametrize", "ManifestPathGroup", "ManifestPathv2023_03_03", "ManifestPathGroup", "ManifestPathv2023_03_03", "ManifestPathGroup", "ManifestPathv2023_03_03", "ManifestPathGroup", "ManifestPathv2023_03_03"]
0
[]
The function (test_OutputDownloader_download_job_output_windows_invalid_file_path_fails) defined within the public class called TestFullDownload.The function start at line 1652 and ends at 1655. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [1652.0] and does ...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_get_asset_root_from_metadata_returns_none_if_not_found
def test_get_asset_root_from_metadata_returns_none_if_not_found(self):assert _get_asset_root_from_metadata(metadata={}) is None
1
2
1
15
0
1,657
1,658
1,657
self
[]
None
{}
1
2
1
["_get_asset_root_from_metadata"]
0
[]
The function (test_get_asset_root_from_metadata_returns_none_if_not_found) defined within the public class called TestFullDownload.The function start at line 1657 and ends at 1658. 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 valu...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_get_manifest_from_s3_error_message_on_access_denied
def test_get_manifest_from_s3_error_message_on_access_denied(self):"""Test if the function raises the expected exception with a proper error messagewhen S3 client's download_fileobj returns an Access Denied (403) error."""s3_client = boto3.client("s3")stubber = Stubber(s3_client)stubber.add_client_error("get_object",se...
1
22
1
109
0
1,660
1,687
1,660
self
[]
None
{"Assign": 2, "Expr": 3, "With": 2}
8
28
8
["boto3.client", "Stubber", "stubber.add_client_error", "patch", "pytest.raises", "get_manifest_from_s3", "isinstance", "str"]
0
[]
The function (test_get_manifest_from_s3_error_message_on_access_denied) defined within the public class called TestFullDownload.The function start at line 1660 and ends at 1687. It contains 22 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value....
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_get_manifest_from_s3_error_message_on_timeout
def test_get_manifest_from_s3_error_message_on_timeout(self):"""Test that the appropriate error is raised when a ReadTimeoutError occursduring an S3 client's download_fileobj call."""mock_s3_client = MagicMock()mock_s3_client.get_object.side_effect = ReadTimeoutError(endpoint_url="test_url")with patch(f"{deadline.__pac...
1
17
1
77
0
1,689
1,710
1,689
self
[]
None
{"Assign": 2, "Expr": 2, "With": 2}
7
22
7
["MagicMock", "ReadTimeoutError", "patch", "pytest.raises", "get_manifest_from_s3", "isinstance", "str"]
0
[]
The function (test_get_manifest_from_s3_error_message_on_timeout) defined within the public class called TestFullDownload.The function start at line 1689 and ends at 1710. 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 de...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_get_tasks_manifests_keys_from_s3_error_message_on_access_denied
def test_get_tasks_manifests_keys_from_s3_error_message_on_access_denied(self):"""Test if the function raises the expected exception with a proper error messagewhen S3 client's list_objects_v2 returns an Access Denied (403) error."""s3_client = boto3.client("s3")stubber = Stubber(s3_client)stubber.add_client_error("lis...
1
25
1
110
0
1,712
1,742
1,712
self
[]
None
{"Assign": 2, "Expr": 3, "With": 2}
8
31
8
["boto3.client", "Stubber", "stubber.add_client_error", "patch", "pytest.raises", "_get_tasks_manifests_keys_from_s3", "isinstance", "str"]
0
[]
The function (test_get_tasks_manifests_keys_from_s3_error_message_on_access_denied) defined within the public class called TestFullDownload.The function start at line 1712 and ends at 1742. It contains 25 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not retur...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_get_tasks_manifests_keys_from_s3_error_message_on_timeout
def test_get_tasks_manifests_keys_from_s3_error_message_on_timeout(self):"""Test that the appropriate error is raised when S3 client's get_paginator call triggersa ReadTimeoutError while getting the keys of task output manifests from S3."""mock_s3_client = MagicMock()mock_s3_client.get_paginator.side_effect = ReadTimeo...
1
20
1
78
0
1,744
1,768
1,744
self
[]
None
{"Assign": 2, "Expr": 2, "With": 2}
7
25
7
["MagicMock", "ReadTimeoutError", "patch", "pytest.raises", "_get_tasks_manifests_keys_from_s3", "isinstance", "str"]
0
[]
The function (test_get_tasks_manifests_keys_from_s3_error_message_on_timeout) defined within the public class called TestFullDownload.The function start at line 1744 and ends at 1768. It contains 20 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any ...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_download_file_error_message_on_access_denied
def test_download_file_error_message_on_access_denied(self):"""Test if the function raises the expected exception with a proper error messagewhen S3 client's download_file returns an Access Denied (403) error."""s3_client = boto3.client("s3")stubber = Stubber(s3_client)stubber.add_client_error("head_object",service_err...
1
40
1
188
0
1,770
1,817
1,770
self
[]
None
{"Assign": 6, "Expr": 5, "With": 2}
17
48
17
["boto3.client", "Stubber", "stubber.add_client_error", "MagicMock", "MagicMock", "ManifestPathv2023_03_03", "patch", "patch", "pytest.raises", "download_file", "isinstance", "str", "Path", "str", "str", "mock_lock.assert_not_called", "mock_collision_dict.assert_not_called"]
0
[]
The function (test_download_file_error_message_on_access_denied) defined within the public class called TestFullDownload.The function start at line 1770 and ends at 1817. It contains 40 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 dec...
aws-deadline_deadline-cloud
TestFullDownload
public
0
0
test_download_file_error_message_on_timeout
def test_download_file_error_message_on_timeout(self):"""Test that the appropriate error is raised when a ReadTimeoutError occursduring a transfer manager's download operation."""mock_s3_client = MagicMock()mock_future = MagicMock()mock_transfer_manager = MagicMock()mock_transfer_manager.download.return_value = mock_fu...
1
39
1
166
0
1,819
1,863
1,819
self
[]
None
{"Assign": 8, "Expr": 4, "With": 2}
16
45
16
["MagicMock", "MagicMock", "MagicMock", "ReadTimeoutError", "MagicMock", "MagicMock", "ManifestPathv2023_03_03", "patch", "patch", "patch", "pytest.raises", "download_file", "isinstance", "str", "mock_lock.assert_not_called", "mock_collision_dict.assert_not_called"]
0
[]
The function (test_download_file_error_message_on_timeout) defined within the public class called TestFullDownload.The function start at line 1819 and ends at 1863. It contains 39 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 ...