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
TestUpload
public
0
0
test_get_asset_groups_for_windows
def test_get_asset_groups_for_windows(self,farm_id: str,queue_id: str,input_paths: Set[str],output_paths: Set[str],referenced_paths: Set[str],local_type_locations: Dict[str, str],shared_type_locations: Dict[str, str],expected_result: List[AssetRootGroup],):asset_manager = S3AssetManager(farm_id=farm_id,queue_id=queue_i...
2
30
9
197
0
2,351
2,382
2,351
self,farm_id,queue_id,input_paths,output_paths,referenced_paths,local_type_locations,shared_type_locations,expected_result
[]
None
{"Assign": 4, "For": 1}
47
32
47
["S3AssetManager", "asset_manager._get_asset_groups", "sorted", "sorted", "len", "len", "range", "len", "root_path.upper", "root_path.upper", "pytest.mark.skipif", "patch.object", "pytest.mark.parametrize", "set", "set", "set", "set", "AssetRootGroup", "Path", "Path", "set", "AssetRootGroup", "Path", "Path", "set", "As...
0
[]
The function (test_get_asset_groups_for_windows) defined within the public class called TestUpload.The function start at line 2351 and ends at 2382. It contains 30 lines of code and it has a cyclomatic complexity of 2. It takes 9 parameters, represented as [2351.0] and does not return any value. It declares 47.0 functi...
aws-deadline_deadline-cloud
TestUpload
public
0
0
test_get_asset_groups_for_windows_case_insensitive
def test_get_asset_groups_for_windows_case_insensitive(self,farm_id: str,queue_id: str,):"""Tests that the asset manager can handle Windows paths and ignore case.(Verifies if two paths are treated as the same when they differ only in letter case.)"""asset_manager = S3AssetManager(farm_id=farm_id,queue_id=queue_id,job_a...
3
27
3
120
0
2,389
2,422
2,389
self,farm_id,queue_id
[]
None
{"Assign": 4, "Expr": 1}
8
34
8
["S3AssetManager", "asset_manager._get_asset_groups", "set", "Path", "Path", "Path", "pytest.mark.skipif", "patch.object"]
0
[]
The function (test_get_asset_groups_for_windows_case_insensitive) defined within the public class called TestUpload.The function start at line 2389 and ends at 2422. It contains 27 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [2389.0] and does not return any value. It dec...
aws-deadline_deadline-cloud
TestUpload
public
0
0
test_separate_files_by_size
def test_separate_files_by_size(self,input_files: List[BaseManifestPath],size_threshold: int,expected_queues: Tuple[List[BaseManifestPath], List[BaseManifestPath]],):"""Tests that a helper method `_separate_files_by_size` is working as expected."""a3_asset_uploader = S3AssetUploader()actual_queues = a3_asset_uploader._...
1
12
4
57
0
2,465
2,479
2,465
self,input_files,size_threshold,expected_queues
[]
None
{"Assign": 2, "Expr": 1}
13
15
13
["S3AssetUploader", "a3_asset_uploader._separate_files_by_size", "pytest.mark.parametrize", "BaseManifestPath", "BaseManifestPath", "BaseManifestPath", "BaseManifestPath", "BaseManifestPath", "BaseManifestPath", "BaseManifestPath", "BaseManifestPath", "BaseManifestPath", "BaseManifestPath"]
0
[]
The function (test_separate_files_by_size) defined within the public class called TestUpload.The function start at line 2465 and ends at 2479. It contains 12 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [2465.0] and does not return any value. It declares 13.0 functions, a...
aws-deadline_deadline-cloud
TestUpload
public
0
0
test_verify_hash_cache_integrity_returns_true_when_cache_and_s3_match
def test_verify_hash_cache_integrity_returns_true_when_cache_and_s3_match(self, cache_entry):# Givenmock_s3_check_cache_impl = MagicMock()mock_s3_check_cache_impl.get_connection_entry.return_value = cache_entrymock_s3_check_cache = MagicMock()mock_s3_check_cache.__enter__.return_value = mock_s3_check_cache_implmock_s3_...
2
38
2
164
0
2,491
2,535
2,491
self,cache_entry
[]
None
{"Assign": 8, "Expr": 2, "If": 1, "With": 2}
16
45
16
["MagicMock", "MagicMock", "MagicMock", "S3AssetUploader", "patch", "patch.object", "s3_asset_uploader.verify_hash_cache_integrity", "AssetManifest", "BaseManifestPath", "file_already_uploaded_spy.assert_called_once_with", "file_already_uploaded_spy.assert_not_called", "pytest.mark.parametrize", "S3CheckCacheEntry", "s...
0
[]
The function (test_verify_hash_cache_integrity_returns_true_when_cache_and_s3_match) defined within the public class called TestUpload.The function start at line 2491 and ends at 2535. It contains 38 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [2491.0] and does not retur...
aws-deadline_deadline-cloud
TestUpload
public
0
0
test_verify_hash_cache_integrity_returns_false_when_cache_and_s3_mismatch
def test_verify_hash_cache_integrity_returns_false_when_cache_and_s3_mismatch(self):# Givenmock_s3_check_cache_impl = MagicMock()mock_s3_check_cache_impl.get_connection_entry.return_value = S3CheckCacheEntry(s3_key="bucket/Data/test-hash",last_seen_time=str(datetime.now().timestamp()),)mock_s3_check_cache = MagicMock()...
1
40
1
186
0
2,537
2,584
2,537
self
[]
None
{"Assign": 8, "Expr": 1, "With": 2}
15
48
15
["MagicMock", "S3CheckCacheEntry", "str", "timestamp", "datetime.now", "MagicMock", "MagicMock", "ClientError", "S3AssetUploader", "patch", "patch.object", "s3_asset_uploader.verify_hash_cache_integrity", "AssetManifest", "BaseManifestPath", "file_already_uploaded_spy.assert_called_once_with"]
0
[]
The function (test_verify_hash_cache_integrity_returns_false_when_cache_and_s3_mismatch) defined within the public class called TestUpload.The function start at line 2537 and ends at 2584. 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...
aws-deadline_deadline-cloud
TestUpload
public
0
0
test_reset_s3_check_cache_removes_cache
def test_reset_s3_check_cache_removes_cache(self, tmpdir):# Givencache_dir: str = "mock_dir"mock_s3_check_cache_impl = MagicMock()mock_s3_check_cache = MagicMock()mock_s3_check_cache.__enter__.return_value = mock_s3_check_cache_impl# Whenwith patch(f"{deadline.__package__}.job_attachments.upload.S3CheckCache",return_va...
1
12
2
59
0
2,586
2,604
2,586
self,tmpdir
[]
None
{"AnnAssign": 1, "Assign": 4, "Expr": 2, "With": 1}
6
19
6
["MagicMock", "MagicMock", "patch", "S3AssetUploader", "s3_asset_uploader.reset_s3_check_cache", "mock_s3_check_cache_impl.remove_cache.assert_called_once"]
0
[]
The function (test_reset_s3_check_cache_removes_cache) defined within the public class called TestUpload.The function start at line 2586 and ends at 2604. It contains 12 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [2586.0] and does not return any value. It declares 6.0 f...
aws-deadline_deadline-cloud
TestUpload
public
0
0
test_upload_object_to_cas_skips_upload_with_cache
def test_upload_object_to_cas_skips_upload_with_cache(self, tmpdir, farm_id, queue_id, manifest_version, default_job_attachment_s3_settings):"""Tests that objects are not uploaded to S3 if there is a corresponding entry in the S3CheckCache"""# Givenasset_root = tmpdir.mkdir("test-root")test_file = asset_root.join("test...
1
32
6
179
0
2,613
2,652
2,613
self,tmpdir,farm_id,queue_id,manifest_version,default_job_attachment_s3_settings
[]
None
{"Assign": 8, "Expr": 3, "With": 1}
12
40
12
["tmpdir.mkdir", "asset_root.join", "test_file.write", "S3AssetManager", "S3CheckCacheEntry", "MagicMock", "patch.object", "asset_manager.asset_uploader.upload_object_to_cas", "BaseManifestPath", "Path", "s3_cache.put_entry.assert_not_called", "pytest.mark.parametrize"]
0
[]
The function (test_upload_object_to_cas_skips_upload_with_cache) defined within the public class called TestUpload.The function start at line 2613 and ends at 2652. It contains 32 lines of code and it has a cyclomatic complexity of 1. It takes 6 parameters, represented as [2613.0] and does not return any value. It decl...
aws-deadline_deadline-cloud
TestUpload
public
0
0
test_open_non_symlink_file_binary
def test_open_non_symlink_file_binary(self, tmp_path: Path):temp_file = tmp_path / "temp_file.txt"temp_file.write_text("this is test file")a3_asset_uploader = S3AssetUploader()with a3_asset_uploader._open_non_symlink_file_binary(str(temp_file)) as file_obj:assert file_obj is not Noneassert file_obj.read() == b"this is ...
1
7
2
52
0
2,654
2,661
2,654
self,tmp_path
[]
None
{"Assign": 2, "Expr": 1, "With": 1}
5
8
5
["temp_file.write_text", "S3AssetUploader", "a3_asset_uploader._open_non_symlink_file_binary", "str", "file_obj.read"]
0
[]
The function (test_open_non_symlink_file_binary) defined within the public class called TestUpload.The function start at line 2654 and ends at 2661. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [2654.0] and does not return any value. It declares 5.0 function...
aws-deadline_deadline-cloud
TestUpload
public
0
0
test_open_non_symlink_file_binary_posix_fail
def test_open_non_symlink_file_binary_posix_fail(self, tmp_path: Path, caplog):caplog.set_level(DEBUG)# IFtarget_file = tmp_path / "target_file.txt"target_file.write_text(("This is target"))symlink_path = tmp_path / "symlink"os.symlink(target_file, symlink_path)# WHENa3_asset_uploader = S3AssetUploader()with a3_asset_u...
2
17
3
98
0
2,663
2,686
2,663
self,tmp_path,caplog
[]
None
{"Assign": 3, "Expr": 3, "If": 1, "With": 1}
7
24
7
["caplog.set_level", "target_file.write_text", "os.symlink", "S3AssetUploader", "a3_asset_uploader._open_non_symlink_file_binary", "str", "hasattr"]
0
[]
The function (test_open_non_symlink_file_binary_posix_fail) defined within the public class called TestUpload.The function start at line 2663 and ends at 2686. It contains 17 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [2663.0] and does not return any value. It declares ...
aws-deadline_deadline-cloud
TestUpload
public
0
0
test_upload_object_to_cas_adds_cache_entry
def test_upload_object_to_cas_adds_cache_entry(self,tmpdir,farm_id,queue_id,manifest_version,default_job_attachment_s3_settings,assert_expected_files_on_s3,):"""Tests that when an object is added to the CAS, an S3 cache entry is added."""# Givenasset_root = tmpdir.mkdir("test-root")test_file = asset_root.join("test-fil...
1
44
7
220
0
2,695
2,748
2,695
self,tmpdir,farm_id,queue_id,manifest_version,default_job_attachment_s3_settings,assert_expected_files_on_s3
[]
None
{"Assign": 10, "Expr": 4, "With": 1}
16
54
16
["tmpdir.mkdir", "asset_root.join", "test_file.write", "S3AssetManager", "MagicMock", "S3CheckCacheEntry", "patch.object", "asset_manager.asset_uploader.upload_object_to_cas", "BaseManifestPath", "Path", "s3_cache.put_entry.assert_called_once_with", "resource", "boto3.Session", "s3.Bucket", "assert_expected_files_on_s3...
0
[]
The function (test_upload_object_to_cas_adds_cache_entry) defined within the public class called TestUpload.The function start at line 2695 and ends at 2748. It contains 44 lines of code and it has a cyclomatic complexity of 1. It takes 7 parameters, represented as [2695.0] and does not return any value. It declares 16...
aws-deadline_deadline-cloud
TestUpload
public
0
0
test_gather_upload_metadata
def test_gather_upload_metadata(self):# Givenmanifest = AssetManifest(hash_alg=HashAlgorithm("xxh128"),total_size=10,paths=[BaseManifestPath(path="output_file", hash="a", size=1, mtime=167907934333848),BaseManifestPath(path="output/nested_output_file", hash="b", size=1, mtime=1479079344833848),],)# When(hash_alg, _, ma...
1
16
1
95
0
2,750
2,768
2,750
self
[]
None
{"Assign": 2}
6
19
6
["AssetManifest", "HashAlgorithm", "BaseManifestPath", "BaseManifestPath", "S3AssetUploader._gather_upload_metadata", "Path"]
0
[]
The function (test_gather_upload_metadata) defined within the public class called TestUpload.The function start at line 2750 and ends at 2768. It contains 16 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It...
aws-deadline_deadline-cloud
TestUpload
public
0
0
test_get_hashed_file_name_from_root_str
def test_get_hashed_file_name_from_root_str(self):# Givenmanifest = AssetManifest(hash_alg=HashAlgorithm("xxh128"),total_size=10,paths=[BaseManifestPath(path="output_file", hash="a", size=1, mtime=167907934333848),BaseManifestPath(path="output/nested_output_file", hash="b", size=1, mtime=1479079344833848),],)# When(has...
1
16
1
90
0
2,770
2,788
2,770
self
[]
None
{"Assign": 2}
5
19
5
["AssetManifest", "HashAlgorithm", "BaseManifestPath", "BaseManifestPath", "S3AssetUploader._get_hashed_file_name_from_root_str"]
0
[]
The function (test_get_hashed_file_name_from_root_str) defined within the public class called TestUpload.The function start at line 2770 and ends at 2788. It contains 16 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functi...
aws-deadline_deadline-cloud
TestUpload
public
0
0
test_get_total_size_of_files_with_valid_files
def test_get_total_size_of_files_with_valid_files(self, tmp_path: Path):"""Test that _get_total_size_of_files correctly calculates total size for valid files."""# Create test files with known sizesfile1 = tmp_path / "file1.txt"file2 = tmp_path / "file2.txt"file1.write_text("hello")# 5 bytesfile2.write_text("world!")# 6...
1
14
2
80
0
2,790
2,807
2,790
self,tmp_path
[]
None
{"Assign": 4, "Expr": 3}
7
18
7
["file1.write_text", "file2.write_text", "S3AssetManager", "JobAttachmentS3Settings", "manager._get_total_size_of_files", "str", "str"]
0
[]
The function (test_get_total_size_of_files_with_valid_files) defined within the public class called TestUpload.The function start at line 2790 and ends at 2807. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [2790.0] and does not return any value. It declares...
aws-deadline_deadline-cloud
TestUpload
public
0
0
test_get_total_size_of_files_with_missing_files
def test_get_total_size_of_files_with_missing_files(self, tmp_path: Path, caplog):"""Test that _get_total_size_of_files handles missing files gracefully."""# Create one real file and reference non-existent filesreal_file = tmp_path / "real.txt"real_file.write_text("content")# 7 bytesmissing_file = tmp_path / "missing.t...
1
14
3
82
0
2,809
2,826
2,809
self,tmp_path,caplog
[]
None
{"Assign": 4, "Expr": 2}
6
18
6
["real_file.write_text", "S3AssetManager", "JobAttachmentS3Settings", "manager._get_total_size_of_files", "str", "str"]
0
[]
The function (test_get_total_size_of_files_with_missing_files) defined within the public class called TestUpload.The function start at line 2809 and ends at 2826. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [2809.0] and does not return any value. It declar...
aws-deadline_deadline-cloud
TestUpload
public
0
0
test_get_total_size_of_files_uses_threadpool
def test_get_total_size_of_files_uses_threadpool(self, tmp_path: Path):"""Test that _get_total_size_of_files uses ThreadPoolExecutor with correct configuration."""test_file = tmp_path / "test.txt"test_file.write_text("test")manager = S3AssetManager(farm_id="farm-123",queue_id="queue-456",job_attachment_settings=JobAtta...
1
16
2
89
0
2,828
2,848
2,828
self,tmp_path
[]
None
{"Assign": 3, "Expr": 4, "With": 1}
7
21
7
["test_file.write_text", "S3AssetManager", "JobAttachmentS3Settings", "patch", "manager._get_total_size_of_files", "str", "mock_executor.assert_called_once_with"]
0
[]
The function (test_get_total_size_of_files_uses_threadpool) defined within the public class called TestUpload.The function start at line 2828 and ends at 2848. It contains 16 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [2828.0] and does not return any value. It declares ...
aws-deadline_deadline-cloud
TestUpload
public
0
0
test_get_total_size_of_files_empty_list
def test_get_total_size_of_files_empty_list(self):"""Test that _get_total_size_of_files returns 0 for empty file list."""manager = S3AssetManager(farm_id="farm-123",queue_id="queue-456",job_attachment_settings=JobAttachmentS3Settings(s3BucketName="test-bucket", rootPrefix="test-prefix"),)total_size = manager._get_total...
1
10
1
45
0
2,850
2,861
2,850
self
[]
None
{"Assign": 2, "Expr": 1}
3
12
3
["S3AssetManager", "JobAttachmentS3Settings", "manager._get_total_size_of_files"]
0
[]
The function (test_get_total_size_of_files_empty_list) defined within the public class called TestUpload.The function start at line 2850 and ends at 2861. It contains 10 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functi...
aws-deadline_deadline-cloud
TestUpload
public
0
0
test_get_total_input_size_from_manifests_uses_manifest_sizes
def test_get_total_input_size_from_manifests_uses_manifest_sizes(self):"""Test that _get_total_input_size_from_manifests uses manifest path sizes directly."""from deadline.job_attachments.models import AssetRootManifestmanager = S3AssetManager(farm_id="farm-123",queue_id="queue-456",job_attachment_settings=JobAttachmen...
1
32
1
192
0
2,863
2,902
2,863
self
[]
None
{"Assign": 5, "Expr": 1}
11
40
11
["S3AssetManager", "JobAttachmentS3Settings", "AssetManifest", "BaseManifestPath", "BaseManifestPath", "AssetManifest", "BaseManifestPath", "AssetRootManifest", "AssetRootManifest", "AssetRootManifest", "manager._get_total_input_size_from_manifests"]
0
[]
The function (test_get_total_input_size_from_manifests_uses_manifest_sizes) defined within the public class called TestUpload.The function start at line 2863 and ends at 2902. It contains 32 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. I...
aws-deadline_deadline-cloud
TestUpload
public
0
0
test_get_total_input_size_from_manifests_empty_manifests
def test_get_total_input_size_from_manifests_empty_manifests(self):"""Test that _get_total_input_size_from_manifests handles empty manifest list."""manager = S3AssetManager(farm_id="farm-123",queue_id="queue-456",job_attachment_settings=JobAttachmentS3Settings(s3BucketName="test-bucket", rootPrefix="test-prefix"),)tota...
1
11
1
51
0
2,904
2,917
2,904
self
[]
None
{"Assign": 2, "Expr": 1}
3
14
3
["S3AssetManager", "JobAttachmentS3Settings", "manager._get_total_input_size_from_manifests"]
0
[]
The function (test_get_total_input_size_from_manifests_empty_manifests) defined within the public class called TestUpload.The function start at line 2904 and ends at 2917. It contains 11 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It de...
aws-deadline_deadline-cloud
TestUpload
public
0
0
test_get_total_input_size_from_manifests_no_asset_manifests
def test_get_total_input_size_from_manifests_no_asset_manifests(self):"""Test that _get_total_input_size_from_manifests handles root manifests with no asset manifests."""from deadline.job_attachments.models import AssetRootManifestmanager = S3AssetManager(farm_id="farm-123",queue_id="queue-456",job_attachment_settings=...
1
16
1
84
0
2,919
2,939
2,919
self
[]
None
{"Assign": 3, "Expr": 1}
5
21
5
["S3AssetManager", "JobAttachmentS3Settings", "AssetRootManifest", "AssetRootManifest", "manager._get_total_input_size_from_manifests"]
0
[]
The function (test_get_total_input_size_from_manifests_no_asset_manifests) defined within the public class called TestUpload.The function start at line 2919 and ends at 2939. It contains 16 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It...
aws-deadline_deadline-cloud
public
public
0
0
assert_progress_report_last_callback
def assert_progress_report_last_callback(num_input_files: int,expected_total_input_bytes: int,on_preparing_to_submit: MagicMock,on_uploading_assets: MagicMock,):"""Assert that the argument of the last callback (when the progress is 100%) is as expected."""readable_total_input_bytes = human_readable_file_size(expected_t...
1
25
4
109
3
2,942
2,970
2,942
num_input_files,expected_total_input_bytes,on_preparing_to_submit,on_uploading_assets
['actual_last_hashing_progress_report', 'readable_total_input_bytes', 'actual_last_upload_progress_report']
None
{"Assign": 5, "Expr": 1}
1
29
1
["human_readable_file_size"]
8
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_attachments.test_upload_py.TestUpload.test_asset_management", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit....
The function (assert_progress_report_last_callback) defined within the public class called public.The function start at line 2942 and ends at 2970. It contains 25 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [2942.0] and does not return any value. It declare 1.0 function,...
aws-deadline_deadline-cloud
public
public
0
0
assert_progress_report_summary_statistics
def assert_progress_report_summary_statistics(actual_summary_statistics: SummaryStatistics,processed_files: int,processed_bytes: int,skipped_files: int,skipped_bytes: int,):"""Assert that the reported summary statistics are as expected."""expected_summary_statistics = SummaryStatistics(total_time=actual_summary_statist...
1
18
5
76
1
2,973
2,993
2,973
actual_summary_statistics,processed_files,processed_bytes,skipped_files,skipped_bytes
['expected_summary_statistics']
None
{"Assign": 1, "Expr": 1}
1
21
1
["SummaryStatistics"]
9
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_job_attachments.test_upload_py.TestUpload.test_asset_management", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit....
The function (assert_progress_report_summary_statistics) defined within the public class called public.The function start at line 2973 and ends at 2993. It contains 18 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [2973.0] and does not return any value. It declare 1.0 func...
aws-deadline_deadline-cloud
TestUtils
public
0
0
test_normalize_windows_path
def test_normalize_windows_path(self, input_path, expected):"""Tests if _normalize_windows_path correctly strips the \\?\\ prefixfrom Windows extended-length paths."""assert _normalize_windows_path(Path(input_path)) == expected
1
2
3
20
0
29
34
29
self,input_path,expected
[]
None
{"Expr": 1}
8
6
8
["_normalize_windows_path", "Path", "pytest.mark.skipif", "pytest.mark.parametrize", "Path", "Path", "Path", "Path"]
0
[]
The function (test_normalize_windows_path) defined within the public class called TestUtils.The function start at line 29 and ends at 34. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [29.0] and does not return any value. It declares 8.0 functions, and It ha...
aws-deadline_deadline-cloud
TestUtils
public
0
0
test_is_relative_to_on_posix
def test_is_relative_to_on_posix(self, path1, path2, expected):"""Tests if the is_relative_to() works correctly when using Posix paths."""assert _is_relative_to(path1, path2) == expected
1
2
4
21
0
54
58
54
self,path1,path2,expected
[]
None
{"Expr": 1}
5
5
5
["_is_relative_to", "pytest.mark.skipif", "pytest.mark.parametrize", "Path", "Path"]
0
[]
The function (test_is_relative_to_on_posix) defined within the public class called TestUtils.The function start at line 54 and ends at 58. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [54.0] and does not return any value. It declares 5.0 functions, and It h...
aws-deadline_deadline-cloud
TestUtils
public
0
0
test_is_relative_to_on_windows
def test_is_relative_to_on_windows(self, path1, path2, expected):"""Tests if the is_relative_to() works correctly when using Windows paths."""assert _is_relative_to(path1, path2) == expected
1
2
4
21
0
97
101
97
self,path1,path2,expected
[]
None
{"Expr": 1}
7
5
7
["_is_relative_to", "pytest.mark.skipif", "pytest.mark.parametrize", "Path", "Path", "Path", "Path"]
0
[]
The function (test_is_relative_to_on_windows) defined within the public class called TestUtils.The function start at line 97 and ends at 101. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [97.0] and does not return any value. It declares 7.0 functions, and I...
aws-deadline_deadline-cloud
public
public
0
0
test_retry.test_bad_function
def test_bad_function():nonlocal call_countcall_count = call_count + 1if call_count == 1:raise NotImplementedError()
2
5
0
20
0
111
115
111
null
[]
None
null
0
0
0
null
0
null
The function (test_retry.test_bad_function) defined within the public class called public.The function start at line 111 and ends at 115. 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..
aws-deadline_deadline-cloud
TestUtils
public
0
0
test_retry
def test_retry(self):"""Test a function that throws an exception is retried."""call_count = 0# Given@_retry(ExceptionToCheck=NotImplementedError, tries=2, delay=0.1, backoff=0.1)def test_bad_function():nonlocal call_countcall_count = call_count + 1if call_count == 1:raise NotImplementedError()# Whentest_bad_function()#...
1
6
1
41
0
103
121
103
self
[]
None
{"Assign": 2, "Expr": 2, "If": 1}
3
19
3
["NotImplementedError", "_retry", "test_bad_function"]
0
[]
The function (test_retry) defined within the public class called TestUtils.The function start at line 103 and ends at 121. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 functions ca...
aws-deadline_deadline-cloud
TestVFSProcessmanager
public
0
0
setup_and_teardown
def setup_and_teardown(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.After test completes, reset all static VFSProcessMan...
2
17
5
66
0
40
65
40
self,request,create_s3_bucket,default_job_attachment_s3_settings,default_asset_sync
[]
None
{"Assign": 6, "Expr": 3, "If": 1, "Return": 1}
2
26
2
["create_s3_bucket", "pytest.fixture"]
0
[]
The function (setup_and_teardown) defined within the public class called TestVFSProcessmanager.The function start at line 40 and ends at 65. It contains 17 lines of code and it has a cyclomatic complexity of 2. It takes 5 parameters, represented as [40.0] and does not return any value. It declares 2.0 functions, and I...
aws-deadline_deadline-cloud
TestVFSProcessmanager
public
0
0
test_build_launch_command
def test_build_launch_command(self,tmp_path: Path,):os.environ[DEADLINE_VFS_ENV_VAR] = str((Path(__file__) / "deadline_vfs").resolve())session_dir: str = str(tmp_path)dest_dir: str = "assetroot-27bggh78dd2b568ab123"local_root: str = f"{session_dir}/{dest_dir}"manifest_path: str = f"{local_root}/manifest.json"test_os_us...
1
63
2
254
0
67
137
67
self,tmp_path
[]
None
{"AnnAssign": 6, "Assign": 7, "With": 2}
10
71
10
["str", "resolve", "Path", "str", "VFSProcessManager", "patch", "process_manager.build_launch_command", "VFSProcessManager", "patch", "process_manager.build_launch_command"]
0
[]
The function (test_build_launch_command) defined within the public class called TestVFSProcessmanager.The function start at line 67 and ends at 137. It contains 63 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [67.0] and does not return any value. It declares 10.0 function...
aws-deadline_deadline-cloud
TestVFSProcessmanager
public
0
0
test_find_vfs_with_env_set
def test_find_vfs_with_env_set(self,tmp_path: Path,):session_dir: str = str(tmp_path)dest_dir: str = "assetroot-27bggh78dd2b568ab123"local_root: str = f"{session_dir}/{dest_dir}"manifest_path: str = f"{local_root}/manifest.json"os.environ[DEADLINE_VFS_ENV_VAR] = str((Path(__file__) / "deadline_vfs").resolve())# Create ...
1
37
2
226
0
139
187
139
self,tmp_path
[]
None
{"AnnAssign": 6, "Assign": 6, "Expr": 3, "With": 3}
18
49
18
["str", "str", "resolve", "Path", "VFSProcessManager", "patch", "process_manager.find_vfs", "str", "process_manager.find_vfs", "mock_which.assert_called_once", "patch", "pytest.raises", "process_manager.find_vfs", "mock_path_exists.assert_has_calls", "call", "call", "os.path.join", "os.getcwd"]
0
[]
The function (test_find_vfs_with_env_set) defined within the public class called TestVFSProcessmanager.The function start at line 139 and ends at 187. It contains 37 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [139.0] and does not return any value. It declares 18.0 funct...
aws-deadline_deadline-cloud
TestVFSProcessmanager
public
0
0
test_find_vfs_with_deadline_env_set
def test_find_vfs_with_deadline_env_set(self,tmp_path: Path,):session_dir: str = str(tmp_path)dest_dir: str = "assetroot-27bggh78dd2b568ab123"local_root: str = f"{session_dir}/{dest_dir}"manifest_path: str = f"{local_root}/manifest.json"os.environ[DEADLINE_VFS_ENV_VAR] = str((Path(__file__) / "deadline_vfs").resolve())...
1
37
2
226
0
189
237
189
self,tmp_path
[]
None
{"AnnAssign": 6, "Assign": 6, "Expr": 3, "With": 3}
18
49
18
["str", "str", "resolve", "Path", "VFSProcessManager", "patch", "process_manager.find_vfs", "str", "process_manager.find_vfs", "mock_which.assert_called_once", "patch", "pytest.raises", "process_manager.find_vfs", "mock_path_exists.assert_has_calls", "call", "call", "os.path.join", "os.getcwd"]
0
[]
The function (test_find_vfs_with_deadline_env_set) defined within the public class called TestVFSProcessmanager.The function start at line 189 and ends at 237. It contains 37 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [189.0] and does not return any value. It declares 1...
aws-deadline_deadline-cloud
TestVFSProcessmanager
public
0
0
find_vfs_with_env_not_set
def find_vfs_with_env_not_set(self,tmp_path: Path,):session_dir: str = str(tmp_path)dest_dir: str = "assetroot-27bggh78dd2b568ab123"local_root: str = f"{session_dir}/{dest_dir}"manifest_path: str = f"{local_root}/manifest.json"# Create process manager without CAS prefixprocess_manager: VFSProcessManager = VFSProcessMan...
2
29
2
173
0
239
273
239
self,tmp_path
[]
None
{"AnnAssign": 6, "Assign": 2, "Expr": 1, "With": 1}
10
35
10
["str", "VFSProcessManager", "os.path.join", "os.getcwd", "patch", "patch", "process_manager.find_vfs", "str", "process_manager.find_vfs", "mock_which.assert_called_once"]
0
[]
The function (find_vfs_with_env_not_set) defined within the public class called TestVFSProcessmanager.The function start at line 239 and ends at 273. It contains 29 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [239.0] and does not return any value. It declares 10.0 functi...
aws-deadline_deadline-cloud
TestVFSProcessmanager
public
0
0
test_find_library_path
def test_find_library_path(self,tmp_path: Path,):session_dir: str = str(tmp_path)dest_dir: str = "assetroot-27bggh78dd2b568ab123"local_root: str = f"{session_dir}/{dest_dir}"manifest_path: str = f"{local_root}/manifest.json"os.environ[DEADLINE_VFS_ENV_VAR] = str((Path(__file__) / "deadline_vfs").resolve())# Create proc...
1
25
2
148
0
275
305
275
self,tmp_path
[]
None
{"AnnAssign": 6, "Assign": 2, "Expr": 2, "With": 1}
10
31
10
["str", "str", "resolve", "Path", "VFSProcessManager", "patch", "process_manager.get_library_path", "str", "process_manager.get_library_path", "mock_find_vfs.assert_called_once"]
0
[]
The function (test_find_library_path) defined within the public class called TestVFSProcessmanager.The function start at line 275 and ends at 305. It contains 25 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [275.0] and does not return any value. It declares 10.0 functions...
aws-deadline_deadline-cloud
TestVFSProcessmanager
public
0
0
test_find_vfs_launch_script_with_env_set
def test_find_vfs_launch_script_with_env_set(self,tmp_path: Path,):session_dir: str = str(tmp_path)dest_dir: str = "assetroot-27bggh78dd2b568ab123"local_root: str = f"{session_dir}/{dest_dir}"manifest_path: str = f"{local_root}/manifest.json"vfs_test_path = str((Path(__file__) / "deadline_vfs").resolve())os.environ[DEA...
1
35
2
180
0
307
348
307
self,tmp_path
[]
None
{"AnnAssign": 6, "Assign": 5, "Expr": 3, "With": 2}
12
42
12
["str", "str", "resolve", "Path", "VFSProcessManager", "patch", "process_manager.find_vfs_launch_script", "str", "process_manager.find_vfs_launch_script", "mock_os_path_exists.assert_called_once", "pytest.raises", "process_manager.find_vfs_launch_script"]
0
[]
The function (test_find_vfs_launch_script_with_env_set) defined within the public class called TestVFSProcessmanager.The function start at line 307 and ends at 348. It contains 35 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [307.0] and does not return any value. It decla...
aws-deadline_deadline-cloud
TestVFSProcessmanager
public
0
0
test_find_vfs_launch_script_with_env_not_set
def test_find_vfs_launch_script_with_env_not_set(self,tmp_path: Path,):session_dir: str = str(tmp_path)dest_dir: str = "assetroot-27bggh78dd2b568ab123"local_root: str = f"{session_dir}/{dest_dir}"manifest_path: str = f"{local_root}/manifest.json"# Note that env variable not setif DEADLINE_VFS_ENV_VAR in os.environ:os.e...
2
35
2
170
0
350
393
350
self,tmp_path
[]
None
{"AnnAssign": 6, "Assign": 3, "Expr": 4, "If": 1, "With": 2}
10
44
10
["str", "os.environ.pop", "VFSProcessManager", "patch", "process_manager.find_vfs_launch_script", "str", "process_manager.find_vfs_launch_script", "mock_os_path_exists.assert_called_once", "pytest.raises", "process_manager.find_vfs_launch_script"]
0
[]
The function (test_find_vfs_launch_script_with_env_not_set) defined within the public class called TestVFSProcessmanager.The function start at line 350 and ends at 393. It contains 35 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [350.0] and does not return any value. It d...
aws-deadline_deadline-cloud
TestVFSProcessmanager
public
0
0
test_create_mount_point
def test_create_mount_point(self,tmp_path: Path,):session_dir: str = str(tmp_path)dest_dir: str = "assetroot-27bggh78dd2b568ab123"local_root: str = f"{session_dir}/{dest_dir}"manifest_path: str = f"{local_root}/manifest.json"os.environ[DEADLINE_VFS_ENV_VAR] = str((Path(__file__) / "deadline_vfs").resolve())# Create pro...
1
22
2
164
0
395
420
395
self,tmp_path
[]
None
{"AnnAssign": 5, "Assign": 1, "Expr": 1}
13
26
13
["str", "str", "resolve", "Path", "VFSProcessManager", "process_manager.create_mount_point", "os.path.exists", "bool", "os.stat", "bool", "os.stat", "bool", "os.stat"]
0
[]
The function (test_create_mount_point) defined within the public class called TestVFSProcessmanager.The function start at line 395 and ends at 420. It contains 22 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [395.0] and does not return any value. It declares 13.0 function...
aws-deadline_deadline-cloud
TestVFSProcessmanager
public
0
0
test_pids_recorded_and_killed
def test_pids_recorded_and_killed(self,tmp_path: Path,):session_dir: str = str(tmp_path)dest_dir1: str = "assetroot-27bggh78dd2b568ab123"local_root1: str = f"{session_dir}/{dest_dir1}"manifest_path1: str = f"{local_root1}/manifest.json"dest_dir2: str = "assetroot-27bggh78dd23131d221"local_root2: str = f"{session_dir}/{...
1
75
2
391
0
422
506
422
self,tmp_path
[]
None
{"AnnAssign": 9, "Assign": 10, "Expr": 5, "With": 3}
28
85
28
["str", "str", "resolve", "Path", "VFSProcessManager", "VFSProcessManager", "patch", "patch", "patch", "patch", "patch", "patch", "MagicMock", "process_manager1.start", "process_manager2.start", "resolve", "open", "pid_file.readlines", "os.path.exists", "os.path.exists", "VFSProcessManager.kill_all_processes", "mock_su...
0
[]
The function (test_pids_recorded_and_killed) defined within the public class called TestVFSProcessmanager.The function start at line 422 and ends at 506. It contains 75 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [422.0] and does not return any value. It declares 28.0 fu...
aws-deadline_deadline-cloud
public
public
0
0
test_process_output_captured.mock_log
def mock_log(str):nonlocal call_countif str == "a" or str == "b" or str == "c":call_count += 1
4
4
1
23
0
551
554
551
null
[]
None
null
0
0
0
null
0
null
The function (test_process_output_captured.mock_log) defined within the public class called public.The function start at line 551 and ends at 554. It contains 4 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value..
aws-deadline_deadline-cloud
public
public
0
0
test_process_output_captured.mock_exception
def mock_exception(str):nonlocal exception_countnonlocal signalexception_count += 1signal.release()
1
5
1
17
0
556
560
556
null
[]
None
null
0
0
0
null
0
null
The function (test_process_output_captured.mock_exception) defined within the public class called public.The function start at line 556 and ends at 560. 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..
aws-deadline_deadline-cloud
public
public
0
0
test_process_output_captured.mock_output
def mock_output():yield "a".encode("utf-8")yield "b".encode("utf-8")yield "c".encode("utf-8")yield Exception("Test Exception")
1
5
0
30
0
563
567
563
null
[]
None
null
0
0
0
null
0
null
The function (test_process_output_captured.mock_output) defined within the public class called public.The function start at line 563 and ends at 567. 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..
aws-deadline_deadline-cloud
TestVFSProcessmanager
public
0
0
test_process_output_captured
def test_process_output_captured(self,tmp_path: Path,):# Test to verify the spawned process output is captured and redirected to log.infosession_dir: str = str(tmp_path)dest_dir1: str = "assetroot-27bggh78dd2b568ab123"local_root1: str = f"{session_dir}/{dest_dir1}"manifest_path1: str = f"{local_root1}/manifest.json"os....
1
49
2
257
0
508
586
508
self,tmp_path
[]
None
{"AnnAssign": 5, "Assign": 11, "AugAssign": 2, "Expr": 6, "If": 1, "With": 1}
23
79
23
["str", "str", "resolve", "Path", "VFSProcessManager", "patch", "patch", "patch", "patch", "patch", "patch", "threading.Semaphore", "signal.release", "encode", "encode", "encode", "Exception", "Mock", "Mock", "MagicMock", "mock_output", "process_manager1.start", "signal.acquire"]
0
[]
The function (test_process_output_captured) defined within the public class called TestVFSProcessmanager.The function start at line 508 and ends at 586. It contains 49 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [508.0] and does not return any value. It declares 23.0 fun...
aws-deadline_deadline-cloud
TestVFSProcessmanager
public
0
0
test_pids_file_behavior
def test_pids_file_behavior(self,tmp_path: Path,):# Test to verify the spawned process output is captured and redirected to log.infosession_dir: str = str(tmp_path)dest_dir1: str = "assetroot-27bggh78dd2b568ab123"local_root1: str = f"{session_dir}/{dest_dir1}"manifest_path1: str = f"{local_root1}/manifest.json"dest_dir...
1
93
2
466
0
588
696
588
self,tmp_path
[]
None
{"AnnAssign": 9, "Assign": 8, "Expr": 5, "With": 1}
35
109
35
["str", "str", "resolve", "Path", "VFSProcessManager", "VFSProcessManager", "patch", "patch", "patch", "patch", "patch", "patch", "patch", "MagicMock", "process_manager1.start", "VFSProcessManager.get_manifest_path_for_mount", "Path", "VFSProcessManager.get_manifest_path_for_mount", "process_manager2.start", "VFSProces...
0
[]
The function (test_pids_file_behavior) defined within the public class called TestVFSProcessmanager.The function start at line 588 and ends at 696. It contains 93 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [588.0] and does not return any value. It declares 35.0 function...
aws-deadline_deadline-cloud
TestVFSProcessmanager
public
0
0
test_manifest_group_set
def test_manifest_group_set(self,tmp_path: Path,):# Test to verify group ownership of the manifest is set properly on startupsession_dir: str = str(tmp_path)dest_dir: str = "assetroot-27bggh78dd2b568ab123"local_root: str = f"{session_dir}/{dest_dir}"manifest_path: str = f"{local_root}/manifest.json"os.environ[DEADLINE_...
1
45
2
224
0
698
749
698
self,tmp_path
[]
None
{"AnnAssign": 5, "Assign": 3, "Expr": 3, "With": 1}
17
52
17
["str", "str", "resolve", "Path", "VFSProcessManager", "patch", "patch", "patch", "patch", "patch", "patch", "patch", "patch", "patch", "process_manager1.start", "mock_chown.assert_called_with", "mock_chmod.assert_called_with"]
0
[]
The function (test_manifest_group_set) defined within the public class called TestVFSProcessmanager.The function start at line 698 and ends at 749. It contains 45 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [698.0] and does not return any value. It declares 17.0 function...
aws-deadline_deadline-cloud
public
public
0
0
test_launch_environment_has_expected_settings
def test_launch_environment_has_expected_settings(tmp_path: Path,vfs_cache_enabled: bool,):# Test to verify when retrieving the launch environment it does not contain os.environ variables (Unless passed in),# it DOES contain the VFSProcessManager's environment variables, and aws configuration variables aren't modifieds...
4
38
2
198
2
753
800
753
tmp_path,vfs_cache_enabled
['launch_env', 'provided_vars']
None
{"AnnAssign": 4, "Assign": 4, "Expr": 1, "For": 1, "If": 2, "With": 1}
14
48
14
["str", "str", "resolve", "Path", "os.environ.pop", "VFSProcessManager", "patch", "process_manager.get_launch_environ", "provided_vars.items", "launch_env.get", "launch_env.get", "launch_env.get", "launch_env.get", "pytest.mark.parametrize"]
0
[]
The function (test_launch_environment_has_expected_settings) defined within the public class called public.The function start at line 753 and ends at 800. It contains 38 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [753.0] and does not return any value. It declares 14.0 f...
aws-deadline_deadline-cloud
public
public
0
0
test_vfs_launched_in_session_folder
def test_vfs_launched_in_session_folder(tmp_path: Path,):# Test to verify the cwd of launched vfs is the session foldersession_dir: str = str(tmp_path)dest_dir: str = "assetroot-cwdtest"local_root: str = f"{session_dir}/{dest_dir}"manifest_path: str = f"{local_root}/manifest.json"os.environ[DEADLINE_VFS_ENV_VAR] = str(...
1
43
1
206
2
803
852
803
tmp_path
['launch_env', 'launch_command']
None
{"AnnAssign": 5, "Assign": 3, "Expr": 2, "With": 1}
14
50
14
["str", "str", "resolve", "Path", "VFSProcessManager", "patch", "patch", "patch", "patch", "patch", "process_manager.start", "process_manager.build_launch_command", "process_manager.get_launch_environ", "mock_popen.assert_called_once_with"]
0
[]
The function (test_vfs_launched_in_session_folder) defined within the public class called public.The function start at line 803 and ends at 852. It contains 43 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 14.0 functions, and ...
aws-deadline_deadline-cloud
public
public
0
0
test_vfs_has_expected_logs_folder
def test_vfs_has_expected_logs_folder(tmp_path: Path,):# Test to verify the expected logs folder is returnedsession_dir: str = str(tmp_path)dest_dir: str = "assetroot-logsdirtest"local_root: str = f"{session_dir}/{dest_dir}"manifest_path: str = f"{local_root}/manifest.json"os.environ[DEADLINE_VFS_ENV_VAR] = str((Path(_...
1
35
1
172
1
855
896
855
tmp_path
['expected_logs_folder']
None
{"AnnAssign": 5, "Assign": 2, "Expr": 1, "With": 1}
13
42
13
["str", "str", "resolve", "Path", "VFSProcessManager", "VFSProcessManager.logs_folder_path", "patch", "patch", "patch", "patch", "patch", "process_manager.start", "process_manager.get_logs_folder"]
0
[]
The function (test_vfs_has_expected_logs_folder) defined within the public class called public.The function start at line 855 and ends at 896. It contains 35 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 13.0 functions, and I...
aws-deadline_deadline-cloud
public
public
0
0
session_hash_db_dir_mock
def session_hash_db_dir_mock():with tempfile.TemporaryDirectory() as tmpdir_path:# We have to use time as a seed, otherwise pytest has fixed random for reproducibility.tmpdir_path = os.path.join(tmpdir_path, str(int(time.time())))with patch(f"{deadline.__package__}.client.config.config_file.get_cache_directory",return_...
1
11
0
65
1
16
27
16
['tmpdir_path']
None
{"Assign": 1, "Expr": 1, "With": 2}
10
12
10
["tempfile.TemporaryDirectory", "os.path.join", "str", "int", "time.time", "patch", "str", "patch", "str", "pytest.fixture"]
0
[]
The function (session_hash_db_dir_mock) defined within the public class called public.The function start at line 16 and ends at 27. It contains 11 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 10.0 functions, and It has 10.0 ...
aws-deadline_deadline-cloud
public
public
0
0
test_process_path_mapping
def test_process_path_mapping(temp_assets_dir):mapping_file_path = os.path.join(temp_assets_dir, "mapping")with open(mapping_file_path, "w", encoding="utf8") as f:json.dump([PATH_MAPPING], f)path_mappings: List[PathMappingRule] = _process_path_mapping(mapping_file_path, [temp_assets_dir])assert len(path_mappings) == 2
1
8
1
63
1
88
96
88
temp_assets_dir
['mapping_file_path']
None
{"AnnAssign": 1, "Assign": 1, "Expr": 1, "With": 1}
5
9
5
["os.path.join", "open", "json.dump", "_process_path_mapping", "len"]
0
[]
The function (test_process_path_mapping) defined within the public class called public.The function start at line 88 and ends at 96. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It has 5.0 fu...
aws-deadline_deadline-cloud
public
public
0
0
test_process_openjd_path_mapping
def test_process_openjd_path_mapping(temp_assets_dir):mapping_file_path = os.path.join(temp_assets_dir, "mapping")with open(mapping_file_path, "w", encoding="utf8") as f:json.dump(OPENJD_PATH_MAPPING, f)path_mappings: List[PathMappingRule] = _process_path_mapping(mapping_file_path, [temp_assets_dir])assert len(path_map...
1
8
1
61
1
99
107
99
temp_assets_dir
['mapping_file_path']
None
{"AnnAssign": 1, "Assign": 1, "Expr": 1, "With": 1}
5
9
5
["os.path.join", "open", "json.dump", "_process_path_mapping", "len"]
0
[]
The function (test_process_openjd_path_mapping) defined within the public class called public.The function start at line 99 and ends at 107. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It ha...
aws-deadline_deadline-cloud
public
public
0
0
session_mock
def session_mock():with patch.object(api._session, "get_boto3_session") as session_mock:yield session_mock
1
3
0
20
0
111
113
111
[]
None
{"Expr": 1, "With": 1}
1
3
1
["patch.object"]
45
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_client.api.test_api_farm_py.test_list_farms_paginated", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94876780_aws_deadline_deadline_cloud.test.unit.deadline_c...
The function (session_mock) defined within the public class called public.The function start at line 111 and ends at 113. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called insi...
aws-deadline_deadline-cloud
TestAttachmentDownload
public
0
0
mock_download_files_from_manifests
def mock_download_files_from_manifests(self):with patch(f"{deadline.__package__}.job_attachments.api.attachment.download_files_from_manifests",return_value=DownloadSummaryStatistics(),) as mock_download_files_from_manifests:yield mock_download_files_from_manifests
1
6
1
23
0
118
123
118
self
[]
None
{"Expr": 1, "With": 1}
2
6
2
["patch", "DownloadSummaryStatistics"]
0
[]
The function (mock_download_files_from_manifests) defined within the public class called TestAttachmentDownload.The function start at line 118 and ends at 123. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 fu...
aws-deadline_deadline-cloud
TestAttachmentDownload
public
0
0
test_download_single_to_mapped_invalid_path_mapping
def test_download_single_to_mapped_invalid_path_mapping(self, temp_assets_dir, session_mock):with open(os.path.join(temp_assets_dir, PATH_MAPPING_HASH),"w",encoding="utf8",) as f:json.dump(MOCK_MANIFEST_CASE[PATH_MAPPING_HASH], f)mapping_file_path = os.path.join(temp_assets_dir, "mapping")with open(mapping_file_path, "...
1
20
3
121
0
125
146
125
self,temp_assets_dir,session_mock
[]
None
{"Assign": 1, "Expr": 3, "With": 3}
9
22
9
["open", "os.path.join", "json.dump", "os.path.join", "open", "json.dump", "pytest.raises", "_attachment_download", "os.path.join"]
0
[]
The function (test_download_single_to_mapped_invalid_path_mapping) defined within the public class called TestAttachmentDownload.The function start at line 125 and ends at 146. It contains 20 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [125.0] and does not return any val...
aws-deadline_deadline-cloud
TestAttachmentDownload
public
0
0
test_download_conflict_resolution
def test_download_conflict_resolution(self, temp_assets_dir, session_mock, mock_download_files_from_manifests, conflict_resolution):with open(os.path.join(temp_assets_dir, PATH_MAPPING_HASH),"w",encoding="utf8",) as f:json.dump(MOCK_MANIFEST_CASE[PATH_MAPPING_HASH], f)mapping_file_path = os.path.join(temp_assets_dir, "...
3
40
5
203
0
157
199
157
self,temp_assets_dir,session_mock,mock_download_files_from_manifests,conflict_resolution
[]
None
{"Assign": 1, "Expr": 5, "If": 1, "With": 2}
14
43
14
["open", "os.path.join", "json.dump", "os.path.join", "open", "json.dump", "_attachment_download", "os.path.join", "_attachment_download", "os.path.join", "mock_download_files_from_manifests.assert_called_once_with", "decode_manifest", "json.dumps", "pytest.mark.parametrize"]
0
[]
The function (test_download_conflict_resolution) defined within the public class called TestAttachmentDownload.The function start at line 157 and ends at 199. It contains 40 lines of code and it has a cyclomatic complexity of 3. It takes 5 parameters, represented as [157.0] and does not return any value. It declares 14...
aws-deadline_deadline-cloud
TestAttachmentDownload
public
0
0
test_download_single_to_current
def test_download_single_to_current(self, temp_assets_dir, session_mock, mock_download_files_from_manifests, manifest_case_key):with open(os.path.join(temp_assets_dir, manifest_case_key),"w",encoding="utf8",) as f:json.dump(MOCK_MANIFEST_CASE[manifest_case_key], f)_attachment_download(manifests=[os.path.join(temp_asset...
1
25
5
118
0
202
228
202
self,temp_assets_dir,session_mock,mock_download_files_from_manifests,manifest_case_key
[]
None
{"Expr": 3, "With": 1}
11
27
11
["open", "os.path.join", "json.dump", "_attachment_download", "os.path.join", "mock_download_files_from_manifests.assert_called_once_with", "os.getcwd", "decode_manifest", "json.dumps", "pytest.mark.parametrize", "MOCK_MANIFEST_CASE.keys"]
0
[]
The function (test_download_single_to_current) defined within the public class called TestAttachmentDownload.The function start at line 202 and ends at 228. It contains 25 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [202.0] and does not return any value. It declares 11.0...
aws-deadline_deadline-cloud
TestAttachmentDownload
public
0
0
test_download_multiple_to_current
def test_download_multiple_to_current(self, temp_assets_dir, session_mock, mock_download_files_from_manifests):expected_merged: Dict[str, BaseAssetManifest] = dict()for manifest_case_key in MOCK_MANIFEST_CASE.keys():expected_merged[f"{os.getcwd()}/{manifest_case_key}"] = decode_manifest(json.dumps(MOCK_MANIFEST_CASE[ma...
3
26
4
146
0
230
258
230
self,temp_assets_dir,session_mock,mock_download_files_from_manifests
[]
None
{"AnnAssign": 1, "Assign": 1, "Expr": 3, "For": 1, "With": 1}
12
29
12
["dict", "MOCK_MANIFEST_CASE.keys", "os.getcwd", "decode_manifest", "json.dumps", "open", "os.path.join", "json.dump", "_attachment_download", "os.path.join", "MOCK_MANIFEST_CASE.keys", "mock_download_files_from_manifests.assert_called_once_with"]
0
[]
The function (test_download_multiple_to_current) defined within the public class called TestAttachmentDownload.The function start at line 230 and ends at 258. It contains 26 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [230.0] and does not return any value. It declares 12...
aws-deadline_deadline-cloud
TestAttachmentDownload
public
0
0
test_download_invalid_input_manifests
def test_download_invalid_input_manifests(self, session_mock):with pytest.raises(NonValidInputError):_attachment_download(manifests=["file-not-found"],s3_root_uri=TEST_S3_URI,boto3_session=session_mock,)
1
7
2
32
0
260
266
260
self,session_mock
[]
None
{"Expr": 1, "With": 1}
2
7
2
["pytest.raises", "_attachment_download"]
0
[]
The function (test_download_invalid_input_manifests) defined within the public class called TestAttachmentDownload.The function start at line 260 and ends at 266. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [260.0] and does not return any value. It declares...
aws-deadline_deadline-cloud
TestAttachmentDownload
public
0
0
test_download_invalid_input_path_mapping_rules
def test_download_invalid_input_path_mapping_rules(self, session_mock):with pytest.raises(NonValidInputError):_attachment_download(manifests=[],s3_root_uri=TEST_S3_URI,boto3_session=session_mock,path_mapping_rules="file-not-found",)
1
8
2
35
0
268
275
268
self,session_mock
[]
None
{"Expr": 1, "With": 1}
2
8
2
["pytest.raises", "_attachment_download"]
0
[]
The function (test_download_invalid_input_path_mapping_rules) defined within the public class called TestAttachmentDownload.The function start at line 268 and ends at 275. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [268.0] and does not return any value. It...
aws-deadline_deadline-cloud
TestAttachmentDownload
public
0
0
test_download_invalid_input_s3_root_uri
def test_download_invalid_input_s3_root_uri(self, session_mock):with pytest.raises(MalformedAttachmentSettingError):_attachment_download(manifests=[],s3_root_uri="MalformedPath",boto3_session=session_mock,)
1
7
2
31
0
277
283
277
self,session_mock
[]
None
{"Expr": 1, "With": 1}
2
7
2
["pytest.raises", "_attachment_download"]
0
[]
The function (test_download_invalid_input_s3_root_uri) defined within the public class called TestAttachmentDownload.The function start at line 277 and ends at 283. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [277.0] and does not return any value. It declar...
aws-deadline_deadline-cloud
TestAttachmentUpload
public
0
0
mock_upload_assets
def mock_upload_assets(self):with patch.object(S3AssetUploader, "upload_assets", return_value=("key", "data")) as mock_upload_assets:yield mock_upload_assets
1
5
1
27
0
288
292
288
self
[]
None
{"Expr": 1, "With": 1}
1
5
1
["patch.object"]
0
[]
The function (mock_upload_assets) defined within the public class called TestAttachmentUpload.The function start at line 288 and ends at 292. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has...
aws-deadline_deadline-cloud
TestAttachmentUpload
public
0
0
test_upload_returns_manifest_info_list
def test_upload_returns_manifest_info_list(self, temp_assets_dir, session_mock):"""Test that _attachment_upload returns a list of UploadManifestInfo objects corresponding to the input manifests."""# Create a path mapping file with two rulespath_mapping = [{"source_path_format": "posix","source_path": "/local/home/test"...
1
36
3
211
0
294
341
294
self,temp_assets_dir,session_mock
[]
None
{"Assign": 6, "Expr": 3, "With": 3}
12
48
12
["os.path.join", "open", "json.dump", "open", "os.path.join", "json.dump", "patch", "_attachment_upload", "os.path.join", "isinstance", "len", "isinstance"]
0
[]
The function (test_upload_returns_manifest_info_list) defined within the public class called TestAttachmentUpload.The function start at line 294 and ends at 341. It contains 36 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [294.0] and does not return any value. It declares...
aws-deadline_deadline-cloud
TestAttachmentUpload
public
0
0
test_upload_invalid_input_manifests
def test_upload_invalid_input_manifests(self, session_mock):with pytest.raises(NonValidInputError):_attachment_upload(manifests=["file-not-found"],s3_root_uri=TEST_S3_URI,boto3_session=session_mock,)
1
7
2
32
0
343
349
343
self,session_mock
[]
None
{"Expr": 1, "With": 1}
2
7
2
["pytest.raises", "_attachment_upload"]
0
[]
The function (test_upload_invalid_input_manifests) defined within the public class called TestAttachmentUpload.The function start at line 343 and ends at 349. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [343.0] and does not return any value. It declares 2.0...
aws-deadline_deadline-cloud
TestAttachmentUpload
public
0
0
test_upload_invalid_input_path_mapping_rules
def test_upload_invalid_input_path_mapping_rules(self, session_mock):with pytest.raises(NonValidInputError):_attachment_upload(manifests=[],s3_root_uri=TEST_S3_URI,boto3_session=session_mock,path_mapping_rules="file-not-found",)
1
8
2
35
0
351
358
351
self,session_mock
[]
None
{"Expr": 1, "With": 1}
2
8
2
["pytest.raises", "_attachment_upload"]
0
[]
The function (test_upload_invalid_input_path_mapping_rules) defined within the public class called TestAttachmentUpload.The function start at line 351 and ends at 358. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [351.0] and does not return any value. It dec...
aws-deadline_deadline-cloud
TestAttachmentUpload
public
0
0
test_upload_invalid_input_s3_root_uri
def test_upload_invalid_input_s3_root_uri(self, temp_assets_dir, session_mock):with pytest.raises(MalformedAttachmentSettingError):_attachment_upload(manifests=[],s3_root_uri="MalformedPath",root_dirs=[temp_assets_dir],boto3_session=session_mock,)
1
8
3
39
0
360
367
360
self,temp_assets_dir,session_mock
[]
None
{"Expr": 1, "With": 1}
2
8
2
["pytest.raises", "_attachment_upload"]
0
[]
The function (test_upload_invalid_input_s3_root_uri) defined within the public class called TestAttachmentUpload.The function start at line 360 and ends at 367. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [360.0] and does not return any value. It declares 2...
aws-deadline_deadline-cloud
TestAttachmentUpload
public
0
0
test_upload_single_from_mapped
def test_upload_single_from_mapped(self, temp_assets_dir, session_mock, mock_upload_assets):file_name: str = f"{PATH_MAPPING_HASH}.manifest"with open(os.path.join(temp_assets_dir, file_name),"w",encoding="utf8",) as f:json.dump(MOCK_MANIFEST_CASE[PATH_MAPPING_HASH], f)mapping_file_path = os.path.join(temp_assets_dir, "...
1
33
4
210
0
369
404
369
self,temp_assets_dir,session_mock,mock_upload_assets
[]
None
{"AnnAssign": 1, "Assign": 1, "Expr": 4, "With": 2}
15
36
15
["open", "os.path.join", "json.dump", "os.path.join", "open", "json.dump", "_attachment_upload", "os.path.join", "mock_upload_assets.assert_called_once_with", "JobAttachmentS3Settings.from_s3_root_uri", "decode_manifest", "json.dumps", "Path", "Path", "config_file.get_cache_directory"]
0
[]
The function (test_upload_single_from_mapped) defined within the public class called TestAttachmentUpload.The function start at line 369 and ends at 404. It contains 33 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [369.0] and does not return any value. It declares 15.0 fu...
aws-deadline_deadline-cloud
TestAttachmentUpload
public
0
0
test_upload_single_map_from_root
def test_upload_single_map_from_root(self, temp_assets_dir, session_mock, mock_upload_assets, manifest_case_key):file_name_prefix: str = hash_data(temp_assets_dir.encode("utf-8"), HashAlgorithm.XXH128)file_name: str = f"{file_name_prefix}_output"with open(os.path.join(temp_assets_dir, file_name),"w",encoding="utf8",) a...
1
28
5
178
0
407
437
407
self,temp_assets_dir,session_mock,mock_upload_assets,manifest_case_key
[]
None
{"AnnAssign": 2, "Expr": 3, "With": 1}
16
31
16
["hash_data", "temp_assets_dir.encode", "open", "os.path.join", "json.dump", "_attachment_upload", "os.path.join", "mock_upload_assets.assert_called_once_with", "JobAttachmentS3Settings.from_s3_root_uri", "decode_manifest", "json.dumps", "Path", "Path", "config_file.get_cache_directory", "pytest.mark.parametrize", "MOC...
0
[]
The function (test_upload_single_map_from_root) defined within the public class called TestAttachmentUpload.The function start at line 407 and ends at 437. It contains 28 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [407.0] and does not return any value. It declares 16.0 ...
aws-deadline_deadline-cloud
TestAttachmentUpload
public
0
0
test_upload_no_mapped_root
def test_upload_no_mapped_root(self, temp_assets_dir, session_mock, mock_upload_assets, manifest_case_key):with open(os.path.join(temp_assets_dir, manifest_case_key),"w",encoding="utf8",) as f:json.dump(MOCK_MANIFEST_CASE[manifest_case_key], f)# Test No valid root defined for given manifestwith pytest.raises(NonValidIn...
1
17
5
100
0
440
459
440
self,temp_assets_dir,session_mock,mock_upload_assets,manifest_case_key
[]
None
{"Expr": 2, "With": 2}
9
20
9
["open", "os.path.join", "json.dump", "pytest.raises", "_attachment_upload", "os.path.join", "str", "pytest.mark.parametrize", "MOCK_MANIFEST_CASE.keys"]
0
[]
The function (test_upload_no_mapped_root) defined within the public class called TestAttachmentUpload.The function start at line 440 and ends at 459. It contains 17 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [440.0] and does not return any value. It declares 9.0 functio...
aws-deadline_deadline-cloud
TestAttachmentUpload
public
0
0
test_upload_no_root_dir_or_mapping
def test_upload_no_root_dir_or_mapping(self, temp_assets_dir, session_mock):with pytest.raises(NonValidInputError) as error:_attachment_upload(manifests=[],s3_root_uri="s3://bucketName/rootPrefix",boto3_session=session_mock,)assert str(error.value) == "One of path mapping rule and root dir must exist, and not both."
1
8
3
44
0
461
469
461
self,temp_assets_dir,session_mock
[]
None
{"Expr": 1, "With": 1}
3
9
3
["pytest.raises", "_attachment_upload", "str"]
0
[]
The function (test_upload_no_root_dir_or_mapping) defined within the public class called TestAttachmentUpload.The function start at line 461 and ends at 469. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [461.0] and does not return any value. It declares 3.0 ...
aws-deadline_deadline-cloud
TestAttachmentUpload
public
0
0
test_upload_both_root_dir_and_mapping
def test_upload_both_root_dir_and_mapping(self, temp_assets_dir, session_mock):with pytest.raises(NonValidInputError) as error:_attachment_upload(manifests=[],path_mapping_rules="fakefilepath",root_dirs=[temp_assets_dir],s3_root_uri="s3://bucketName/rootPrefix",boto3_session=session_mock,)assert str(error.value) == "On...
1
10
3
54
0
471
481
471
self,temp_assets_dir,session_mock
[]
None
{"Expr": 1, "With": 1}
3
11
3
["pytest.raises", "_attachment_upload", "str"]
0
[]
The function (test_upload_both_root_dir_and_mapping) defined within the public class called TestAttachmentUpload.The function start at line 471 and ends at 481. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [471.0] and does not return any value. It declares ...
aws-deadline_deadline-cloud
TestDiffAPI
public
0
0
temp_dir
def temp_dir(self):with tempfile.TemporaryDirectory() as tmpdir_path:yield tmpdir_path
1
3
1
16
0
18
20
18
self
[]
None
{"Expr": 1, "With": 1}
1
3
1
["tempfile.TemporaryDirectory"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3924769_jaraco_zipp.tests.test_path_py.TestPath.zipfile_ondisk"]
The function (temp_dir) defined within the public class called TestDiffAPI.The function start at line 18 and ends at 20. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called insid...
aws-deadline_deadline-cloud
TestDiffAPI
public
0
0
_snapshot_folder_helper
def _snapshot_folder_helper(self, temp_dir, root_dir) -> str:"""Snapshot with a folder and a single file in it. Should generate a manifest containing 1 file."""# Given snapshot folder and 1 test filetest_file_name = TEST_FILEtest_file = os.path.join(root_dir, test_file_name)os.makedirs(os.path.dirname(test_file), exist...
1
16
3
140
0
22
48
22
self,temp_dir,root_dir
[]
str
{"AnnAssign": 1, "Assign": 3, "Expr": 3, "Return": 1, "With": 2}
9
27
9
["os.path.join", "os.makedirs", "os.path.dirname", "open", "f.write", "_manifest_snapshot", "open", "json.load", "len"]
0
[]
The function (_snapshot_folder_helper) defined within the public class called TestDiffAPI.The function start at line 22 and ends at 48. It contains 16 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [22.0] and does not return any value. It declares 9.0 functions, and It has...
aws-deadline_deadline-cloud
TestDiffAPI
public
0
0
test_diff_no_change
def test_diff_no_change(self, temp_dir):"""Diff with the same folder, no new files. Should return with all empty no diff result."""# Givenroot_dir = os.path.join(temp_dir, "snapshot")manifest_file = self._snapshot_folder_helper(temp_dir=temp_dir, root_dir=root_dir)# Whenmanifest_diff: ManifestDiff = _manifest_diff(root...
1
7
2
75
0
50
62
50
self,temp_dir
[]
None
{"AnnAssign": 1, "Assign": 2, "Expr": 1}
6
13
6
["os.path.join", "self._snapshot_folder_helper", "_manifest_diff", "len", "len", "len"]
0
[]
The function (test_diff_no_change) defined within the public class called TestDiffAPI.The function start at line 50 and ends at 62. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [50.0] and does not return any value. It declares 6.0 functions, and It has 6.0 ...
aws-deadline_deadline-cloud
TestDiffAPI
public
0
0
test_diff_new_files
def test_diff_new_files(self, temp_dir):"""Diff with the same folder, new files. Should return with all empty no diff result."""# Givenroot_dir = os.path.join(temp_dir, "snapshot")manifest_file = self._snapshot_folder_helper(temp_dir=temp_dir, root_dir=root_dir)# When# Make 2 new files, one in the snapshot dir, another...
1
17
2
156
0
64
90
64
self,temp_dir
[]
None
{"AnnAssign": 1, "Assign": 7, "Expr": 4}
14
27
14
["os.path.join", "self._snapshot_folder_helper", "os.path.join", "touch", "Path", "os.path.join", "os.makedirs", "os.path.dirname", "touch", "Path", "_manifest_diff", "len", "len", "len"]
0
[]
The function (test_diff_new_files) defined within the public class called TestDiffAPI.The function start at line 64 and ends at 90. It contains 17 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [64.0] and does not return any value. It declares 14.0 functions, and It has 14...
aws-deadline_deadline-cloud
TestDiffAPI
public
0
0
test_diff_deleted_file
def test_diff_deleted_file(self, temp_dir):"""Diff with the same folder, delete the test file. It should be found by delete."""# Givenroot_dir = os.path.join(temp_dir, "snapshot")manifest_file = self._snapshot_folder_helper(temp_dir=temp_dir, root_dir=root_dir)# Whenos.remove(os.path.join(root_dir, TEST_FILE))manifest_...
1
9
2
96
0
92
108
92
self,temp_dir
[]
None
{"AnnAssign": 1, "Assign": 2, "Expr": 2}
8
17
8
["os.path.join", "self._snapshot_folder_helper", "os.remove", "os.path.join", "_manifest_diff", "len", "len", "len"]
0
[]
The function (test_diff_deleted_file) defined within the public class called TestDiffAPI.The function start at line 92 and ends at 108. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [92.0] and does not return any value. It declares 8.0 functions, and It has ...
aws-deadline_deadline-cloud
TestDiffAPI
public
0
0
test_diff_modified_file_size
def test_diff_modified_file_size(self, temp_dir):"""Diff with the same folder, modified the test file. It should be found by modified."""# Givenroot_dir = os.path.join(temp_dir, "snapshot")manifest_file = self._snapshot_folder_helper(temp_dir=temp_dir, root_dir=root_dir)# Whentest_file = os.path.join(root_dir, TEST_FIL...
1
11
2
109
0
110
129
110
self,temp_dir
[]
None
{"AnnAssign": 1, "Assign": 3, "Expr": 2, "With": 1}
9
20
9
["os.path.join", "self._snapshot_folder_helper", "os.path.join", "open", "f.write", "_manifest_diff", "len", "len", "len"]
0
[]
The function (test_diff_modified_file_size) defined within the public class called TestDiffAPI.The function start at line 110 and ends at 129. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [110.0] and does not return any value. It declares 9.0 functions, and...
aws-deadline_deadline-cloud
TestManifestDownload
public
0
0
temp_dir
def temp_dir(self):with tempfile.TemporaryDirectory() as tmpdir_path:yield tmpdir_path
1
3
1
16
0
14
16
14
self
[]
None
{"Expr": 1, "With": 1}
1
3
1
["tempfile.TemporaryDirectory"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3924769_jaraco_zipp.tests.test_path_py.TestPath.zipfile_ondisk"]
The function (temp_dir) defined within the public class called TestManifestDownload.The function start at line 14 and ends at 16. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function cal...
aws-deadline_deadline-cloud
TestManifestDownload
public
0
0
test_download_job
def test_download_job(self,mock_get_output_manifest: MagicMock,mock_get_manifest_from_s3: MagicMock,mock_queue_session: MagicMock,job_manifests: List,step_manifests: List,temp_dir: str,) -> None:# This is heavily mocked, so return nothing. Integration tests tests full manifest merging.mock_get_manifest_from_s3.return_v...
1
36
7
167
0
33
82
33
self,mock_get_output_manifest,mock_get_manifest_from_s3,mock_queue_session,job_manifests,step_manifests,temp_dir
[]
None
{"AnnAssign": 1, "Assign": 9}
12
50
12
["MagicMock", "MagicMock", "MagicMock", "_manifest_download", "patch", "patch", "patch", "pytest.mark.parametrize", "pytest.param", "pytest.param", "pytest.param", "pytest.param"]
0
[]
The function (test_download_job) defined within the public class called TestManifestDownload.The function start at line 33 and ends at 82. It contains 36 lines of code and it has a cyclomatic complexity of 1. It takes 7 parameters, represented as [33.0] and does not return any value. It declares 12.0 functions, and It...
aws-deadline_deadline-cloud
TestManifestDownload
public
0
0
test_download_job_paginate_through_step_dependencies
def test_download_job_paginate_through_step_dependencies(self,mock_get_output_manifest: MagicMock,mock_get_manifest_from_s3: MagicMock,mock_queue_session: MagicMock,temp_dir: str,):# This is heavily mocked, so return nothing. Integration tests tests full manifest merging.mock_get_manifest_from_s3.return_value = Nonemoc...
3
37
5
210
0
87
137
87
self,mock_get_output_manifest,mock_get_manifest_from_s3,mock_queue_session,temp_dir
[]
None
{"AnnAssign": 1, "Assign": 9}
9
51
9
["MagicMock", "MagicMock", "MagicMock", "range", "range", "_manifest_download", "patch", "patch", "patch"]
0
[]
The function (test_download_job_paginate_through_step_dependencies) defined within the public class called TestManifestDownload.The function start at line 87 and ends at 137. It contains 37 lines of code and it has a cyclomatic complexity of 3. It takes 5 parameters, represented as [87.0] and does not return any value....
aws-deadline_deadline-cloud
TestMergeAPI
public
0
0
test_merge_same_file
def test_merge_same_file(self, temp_dir, test_manifest_one):"""Merge with one manifest file"""# Givenmerge_dir = os.path.join(temp_dir, "merge")manifest_one = os.path.join(temp_dir, "manifest_1")with open(manifest_one, "w", encoding="utf8") as f:json.dump(test_manifest_one, f)# Whenmanifest_merge: Optional[ManifestMerg...
1
11
3
100
0
13
32
13
self,temp_dir,test_manifest_one
[]
None
{"AnnAssign": 1, "Assign": 2, "Expr": 2, "With": 1}
5
20
5
["os.path.join", "os.path.join", "open", "json.dump", "_manifest_merge"]
0
[]
The function (test_merge_same_file) defined within the public class called TestMergeAPI.The function start at line 13 and ends at 32. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [13.0] and does not return any value. It declares 5.0 functions, and It has 5...
aws-deadline_deadline-cloud
TestMergeAPI
public
0
0
test_merge_different_files
def test_merge_different_files(self, temp_dir, test_manifest_one, test_manifest_two):"""Merge two different manifest files"""# Givenmanifest_one = os.path.join(temp_dir, "manifest_1")manifest_two = os.path.join(temp_dir, "manifest_2")merge_dir = os.path.join(temp_dir, "merge")with open(manifest_one, "w", encoding="utf8...
1
17
4
139
0
34
60
34
self,temp_dir,test_manifest_one,test_manifest_two
[]
None
{"AnnAssign": 1, "Assign": 3, "Expr": 3, "With": 2}
8
27
8
["os.path.join", "os.path.join", "os.path.join", "open", "json.dump", "open", "json.dump", "_manifest_merge"]
0
[]
The function (test_merge_different_files) defined within the public class called TestMergeAPI.The function start at line 34 and ends at 60. It contains 17 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [34.0] and does not return any value. It declares 8.0 functions, and It...
aws-deadline_deadline-cloud
TestManifestUpload
public
0
0
temp_dir
def temp_dir(self):with tempfile.TemporaryDirectory() as tmpdir_path:yield tmpdir_path
1
3
1
16
0
20
22
20
self
[]
None
{"Expr": 1, "With": 1}
1
3
1
["tempfile.TemporaryDirectory"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3924769_jaraco_zipp.tests.test_path_py.TestPath.zipfile_ondisk"]
The function (temp_dir) defined within the public class called TestManifestUpload.The function start at line 20 and ends at 22. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function calle...
aws-deadline_deadline-cloud
TestManifestUpload
public
0
0
mock_manifest_file
def mock_manifest_file(self, temp_dir) -> str:"""Create a Mock manifest file saved to the temp dir.:return path to the test file."""path = os.path.join(temp_dir, "test.manifest")with open(path, "w") as manifest_file:manifest_file.write(TEST_MANIFEST)return path
1
5
2
40
0
25
33
25
self,temp_dir
[]
str
{"Assign": 1, "Expr": 2, "Return": 1, "With": 1}
3
9
3
["os.path.join", "open", "manifest_file.write"]
0
[]
The function (mock_manifest_file) defined within the public class called TestManifestUpload.The function start at line 25 and ends at 33. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [25.0] and does not return any value. It declares 3.0 functions, and It ha...
aws-deadline_deadline-cloud
TestManifestUpload
public
0
0
test_upload
def test_upload(self,mock_get_boto3_session: MagicMock,mock_upload_assets: MagicMock,mock_manifest_file: str,) -> None:"""Upload is really simple. It is a pass through to S3AssetUploader. Make sure it is called correctly."""# Givenmock_boto_session = MagicMock()mock_get_boto3_session.return_value = mock_boto_session# W...
1
21
4
81
0
37
65
37
self,mock_get_boto3_session,mock_upload_assets,mock_manifest_file
[]
None
{"Assign": 2, "Expr": 3}
5
29
5
["MagicMock", "_manifest_upload", "mock_upload_assets.return_value.upload_bytes_to_s3.assert_called_once_with", "patch", "patch"]
0
[]
The function (test_upload) defined within the public class called TestManifestUpload.The function start at line 37 and ends at 65. It contains 21 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [37.0] and does not return any value. It declares 5.0 functions, and It has 5.0 ...
aws-deadline_deadline-cloud
TestManifestUpload
public
0
0
test_upload_with_prefix
def test_upload_with_prefix(self,mock_get_boto3_session: MagicMock,mock_upload_assets: MagicMock,mock_manifest_file: str,) -> None:"""Upload is really simple. It is a pass through to S3AssetUploader. Make sure it is called correctly with prefix"""# Givenmock_boto_session = MagicMock()mock_get_boto3_session.return_value...
1
22
4
89
0
69
98
69
self,mock_get_boto3_session,mock_upload_assets,mock_manifest_file
[]
None
{"Assign": 2, "Expr": 3}
5
30
5
["MagicMock", "_manifest_upload", "mock_upload_assets.return_value.upload_bytes_to_s3.assert_called_once_with", "patch", "patch"]
0
[]
The function (test_upload_with_prefix) defined within the public class called TestManifestUpload.The function start at line 69 and ends at 98. It contains 22 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [69.0] and does not return any value. It declares 5.0 functions, and ...
aws-deadline_deadline-cloud
public
public
0
0
test_human_readable_file_size
def test_human_readable_file_size(file_size: int, expected_output: str):"""Test that given a file size in bytes, the expected human readable file size is output."""assert human_readable_file_size(file_size) == expected_output
1
2
2
19
0
55
59
55
file_size,expected_output
[]
None
{"Expr": 1}
2
5
2
["human_readable_file_size", "pytest.mark.parametrize"]
0
[]
The function (test_human_readable_file_size) defined within the public class called public.The function start at line 55 and ends at 59. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [55.0] and does not return any value. It declares 2.0 functions, and It has...
aws-deadline_deadline-cloud
public
public
0
0
test_summarize_paths_without_nesting_without_sizes
def test_summarize_paths_without_nesting_without_sizes(path_list, expected_output):"""Given each list of paths, confirm the expected output."""assert summarize_paths_by_sequence(path_list) == expected_output# Since there's no nesting in these cases, this is equivalentassert summarize_paths_by_nested_directory(path_list...
1
3
2
22
0
98
102
98
path_list,expected_output
[]
None
{"Expr": 1}
15
5
15
["summarize_paths_by_sequence", "summarize_paths_by_nested_directory", "pytest.mark.parametrize", "PathSummary", "PathSummary", "PathSummary", "PathSummary", "PathSummary", "PathSummary", "PathSummary", "PathSummary", "PathSummary", "PathSummary", "PathSummary", "PathSummary"]
0
[]
The function (test_summarize_paths_without_nesting_without_sizes) defined within the public class called public.The function start at line 98 and ends at 102. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [98.0] and does not return any value. It declares 15.0...
aws-deadline_deadline-cloud
public
public
0
0
test_summarize_paths_without_nesting_with_sizes
def test_summarize_paths_without_nesting_with_sizes(path_list, sizes, expected_output):"""Given each list of paths, confirm the expected output."""assert summarize_paths_by_sequence(path_list, total_size_by_path=sizes) == expected_output# Since there's no nesting in these cases, this is equivalentassert (summarize_path...
1
5
3
34
0
178
184
178
path_list,sizes,expected_output
[]
None
{"Expr": 1}
3
7
3
["summarize_paths_by_sequence", "summarize_paths_by_nested_directory", "pytest.mark.parametrize"]
0
[]
The function (test_summarize_paths_without_nesting_with_sizes) defined within the public class called public.The function start at line 178 and ends at 184. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [178.0] and does not return any value. It declares 3.0 f...
aws-deadline_deadline-cloud
public
public
0
0
test_summarize_paths_with_nesting_without_sizes
def test_summarize_paths_with_nesting_without_sizes(path_list, expected_seq_output, expected_nest_output):"""Given each list of paths, confirm the expected output."""assert summarize_paths_by_sequence(path_list) == expected_seq_outputassert summarize_paths_by_nested_directory(path_list) == expected_nest_output
1
5
3
24
0
312
317
312
path_list,expected_seq_output,expected_nest_output
[]
None
{"Expr": 1}
3
6
3
["summarize_paths_by_sequence", "summarize_paths_by_nested_directory", "pytest.mark.parametrize"]
0
[]
The function (test_summarize_paths_with_nesting_without_sizes) defined within the public class called public.The function start at line 312 and ends at 317. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [312.0] and does not return any value. It declares 3.0 f...
aws-deadline_deadline-cloud
public
public
0
0
test_summarize_paths_with_nesting_with_sizes
def test_summarize_paths_with_nesting_with_sizes(path_list, sizes, expected_seq_output, expected_nest_output):"""Given each list of paths, confirm the expected output."""assert summarize_paths_by_sequence(path_list, total_size_by_path=sizes) == expected_seq_outputassert (summarize_paths_by_nested_directory(path_list, t...
1
8
4
36
0
489
497
489
path_list,sizes,expected_seq_output,expected_nest_output
[]
None
{"Expr": 1}
3
9
3
["summarize_paths_by_sequence", "summarize_paths_by_nested_directory", "pytest.mark.parametrize"]
0
[]
The function (test_summarize_paths_with_nesting_with_sizes) defined within the public class called public.The function start at line 489 and ends at 497. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [489.0] and does not return any value. It declares 3.0 func...
aws-deadline_deadline-cloud
public
public
0
0
test_summarize_path_list
def test_summarize_path_list(path_list, kwargs, expected_output):if "total_size_by_path" in kwargs:kwargs["total_size_by_path"] = {path.replace("/", os.path.sep): sizefor path, size in kwargs["total_size_by_path"].items()}assert summarize_path_list([path.replace("/", os.path.sep) for path in path_list], **kwargs) == ex...
4
9
3
86
0
668
676
668
path_list,kwargs,expected_output
[]
None
{"Assign": 1, "If": 1}
6
9
6
["path.replace", "items", "summarize_path_list", "path.replace", "expected_output.replace", "pytest.mark.parametrize"]
0
[]
The function (test_summarize_path_list) defined within the public class called public.The function start at line 668 and ends at 676. It contains 9 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [668.0] and does not return any value. It declares 6.0 functions, and It has 6...
aws-deadline_deadline-cloud
public
public
0
0
test_summarize_path_list_with_path_format
def test_summarize_path_list_with_path_format(path_list, kwargs, expected_output):assert summarize_path_list(path_list, **kwargs) == expected_output
1
2
3
19
0
699
700
699
path_list,kwargs,expected_output
[]
None
{}
2
2
2
["summarize_path_list", "pytest.mark.parametrize"]
0
[]
The function (test_summarize_path_list_with_path_format) defined within the public class called public.The function start at line 699 and ends at 700. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [699.0] and does not return any value. It declares 2.0 functio...
aws-deadline_deadline-cloud
TestSnapshotAPI
public
0
0
temp_dir
def temp_dir(self):with tempfile.TemporaryDirectory() as tmpdir_path:yield tmpdir_path
1
3
1
16
0
17
19
17
self
[]
None
{"Expr": 1, "With": 1}
1
3
1
["tempfile.TemporaryDirectory"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3924769_jaraco_zipp.tests.test_path_py.TestPath.zipfile_ondisk"]
The function (temp_dir) defined within the public class called TestSnapshotAPI.The function start at line 17 and ends at 19. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called i...
aws-deadline_deadline-cloud
TestSnapshotAPI
public
0
0
get_manifest_files
def get_manifest_files(self, manifest_path) -> Set[str]:"""Helper method to extract file paths from a manifest"""with open(manifest_path, "r") as manifest_file:manifest_payload = json.load(manifest_file)return {item["path"] for item in manifest_payload["paths"]}
2
4
2
45
0
21
25
21
self,manifest_path
[]
Set[str]
{"Assign": 1, "Expr": 1, "Return": 1, "With": 1}
2
5
2
["open", "json.load"]
0
[]
The function (get_manifest_files) defined within the public class called TestSnapshotAPI.The function start at line 21 and ends at 25. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [21.0] and does not return any value. It declares 2.0 functions, and It has 2...
aws-deadline_deadline-cloud
TestSnapshotAPI
public
0
0
test_snapshot_empty_folder
def test_snapshot_empty_folder(self, temp_dir):"""Snapshot with an invalid folder. Should find nothing and no manifest."""# Given foobar folderroot_dir = os.path.join(temp_dir, "foobar")os.makedirs(root_dir)# When, Then.with pytest.raises(ManifestCreationException):_manifest_snapshot(root=root_dir, destination=temp_dir...
1
5
2
48
0
27
38
27
self,temp_dir
[]
None
{"Assign": 1, "Expr": 3, "With": 1}
4
12
4
["os.path.join", "os.makedirs", "pytest.raises", "_manifest_snapshot"]
0
[]
The function (test_snapshot_empty_folder) defined within the public class called TestSnapshotAPI.The function start at line 27 and ends at 38. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [27.0] and does not return any value. It declares 4.0 functions, and ...
aws-deadline_deadline-cloud
TestSnapshotAPI
public
0
0
test_snapshot_folder
def test_snapshot_folder(self, temp_dir):"""Snapshot with a folder and a single file in it. Should generate a manifest containing 1 file."""# Given snapshot folder and 1 test fileroot_dir = os.path.join(temp_dir, "snapshot")test_file_name = "test_file"test_file = os.path.join(root_dir, test_file_name)os.makedirs(os.pat...
1
18
2
157
0
40
67
40
self,temp_dir
[]
None
{"AnnAssign": 1, "Assign": 4, "Expr": 3, "With": 2}
10
28
10
["os.path.join", "os.path.join", "os.makedirs", "os.path.dirname", "open", "f.write", "_manifest_snapshot", "open", "json.load", "len"]
0
[]
The function (test_snapshot_folder) defined within the public class called TestSnapshotAPI.The function start at line 40 and ends at 67. It contains 18 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [40.0] and does not return any value. It declares 10.0 functions, and It h...
aws-deadline_deadline-cloud
TestSnapshotAPI
public
0
0
test_snapshot_recursive_folder
def test_snapshot_recursive_folder(self, temp_dir):"""Snapshot with a folder a file, a nested folder and a file in the nested folder."""# Given snapshot folder and 1 test fileroot_dir = os.path.join(temp_dir, "snapshot")test_file_name = "test_file"test_file = os.path.join(root_dir, test_file_name)os.makedirs(os.path.di...
2
28
2
228
0
69
108
69
self,temp_dir
[]
None
{"AnnAssign": 1, "Assign": 8, "Expr": 6, "For": 1, "With": 3}
17
40
17
["os.path.join", "os.path.join", "os.makedirs", "os.path.dirname", "open", "f.write", "os.path.join", "os.makedirs", "os.path.dirname", "open", "f.write", "_manifest_snapshot", "open", "json.load", "len", "set", "files.add"]
0
[]
The function (test_snapshot_recursive_folder) defined within the public class called TestSnapshotAPI.The function start at line 69 and ends at 108. It contains 28 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [69.0] and does not return any value. It declares 17.0 functions...
aws-deadline_deadline-cloud
TestSnapshotAPI
public
0
0
test_snapshot_includes_excludes
def test_snapshot_includes_excludes(self, temp_dir, includes: List[str], excludes: List[str], results: List[str]):"""Snapshot with a folder a file, a nested folder and a file in the nested folder.Include glob includes "test_file", "nested_file".Should not pick up "excluded"."""# Given snapshot folder and 1 test fileroo...
3
44
5
325
0
134
193
134
self,temp_dir,includes,excludes,results
[]
None
{"AnnAssign": 1, "Assign": 12, "Expr": 8, "For": 2, "With": 5}
30
60
30
["os.path.join", "os.path.join", "os.makedirs", "os.path.dirname", "open", "f.write", "os.path.join", "open", "f.write", "os.path.join", "os.makedirs", "os.path.dirname", "open", "f.write", "os.path.join", "open", "f.write", "_manifest_snapshot", "open", "json.load", "len", "len", "set", "files.add", "pytest.mark.param...
0
[]
The function (test_snapshot_includes_excludes) defined within the public class called TestSnapshotAPI.The function start at line 134 and ends at 193. It contains 44 lines of code and it has a cyclomatic complexity of 3. It takes 5 parameters, represented as [134.0] and does not return any value. It declares 30.0 functi...
aws-deadline_deadline-cloud
TestSnapshotAPI
public
0
0
test_snapshot_diff
def test_snapshot_diff(self, temp_dir):"""Create a snapshot with 1 file. Add a second file and make a diff manifest.Only the second file should be found."""# Given snapshot folder and 1 test fileroot_dir = os.path.join(temp_dir, "snapshot")test_file_name = "test_file"test_file = os.path.join(root_dir, test_file_name)os...
2
30
2
251
0
195
241
195
self,temp_dir
[]
None
{"AnnAssign": 2, "Assign": 7, "Expr": 6, "For": 1, "With": 3}
18
47
18
["os.path.join", "os.path.join", "os.makedirs", "os.path.dirname", "open", "f.write", "_manifest_snapshot", "os.path.join", "os.makedirs", "os.path.dirname", "open", "f.write", "_manifest_snapshot", "open", "json.load", "len", "set", "files.add"]
0
[]
The function (test_snapshot_diff) defined within the public class called TestSnapshotAPI.The function start at line 195 and ends at 241. It contains 30 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [195.0] and does not return any value. It declares 18.0 functions, and It ...
aws-deadline_deadline-cloud
TestSnapshotAPI
public
0
0
test_snapshot_time_diff
def test_snapshot_time_diff(self, temp_dir):"""Create a snapshot with 1 file. Change the time stamp of the file.The diff manifest should contain the file again."""# Given snapshot folder and 1 test fileroot_dir = os.path.join(temp_dir, "snapshot")test_file_name = "test_file"test_file = os.path.join(root_dir, test_file_...
2
26
2
215
0
243
286
243
self,temp_dir
[]
None
{"AnnAssign": 2, "Assign": 5, "Expr": 5, "For": 1, "With": 2}
14
44
14
["os.path.join", "os.path.join", "os.makedirs", "os.path.dirname", "open", "f.write", "_manifest_snapshot", "os.utime", "_manifest_snapshot", "open", "json.load", "len", "set", "files.add"]
0
[]
The function (test_snapshot_time_diff) defined within the public class called TestSnapshotAPI.The function start at line 243 and ends at 286. It contains 26 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [243.0] and does not return any value. It declares 14.0 functions, and...
aws-deadline_deadline-cloud
TestSnapshotAPI
public
0
0
test_snapshot_size_diff
def test_snapshot_size_diff(self, temp_dir):"""Create a snapshot with 1 file. Change the contents of the file.The diff manifest should contain the file again."""# Given snapshot folder and 1 test fileroot_dir = os.path.join(temp_dir, "snapshot")test_file_name = "test_file"test_file = os.path.join(root_dir, test_file_na...
2
27
2
219
0
288
332
288
self,temp_dir
[]
None
{"AnnAssign": 2, "Assign": 5, "Expr": 5, "For": 1, "With": 3}
15
45
15
["os.path.join", "os.path.join", "os.makedirs", "os.path.dirname", "open", "f.write", "_manifest_snapshot", "open", "f.write", "_manifest_snapshot", "open", "json.load", "len", "set", "files.add"]
0
[]
The function (test_snapshot_size_diff) defined within the public class called TestSnapshotAPI.The function start at line 288 and ends at 332. It contains 27 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [288.0] and does not return any value. It declares 15.0 functions, and...
aws-deadline_deadline-cloud
TestSnapshotAPI
public
0
0
test_snapshot_diff_no_diff
def test_snapshot_diff_no_diff(self, temp_dir):"""Create a snapshot with 1 file. Snapshot again and diff. It should have no manifest."""# Given snapshot folder and 1 test fileroot_dir = os.path.join(temp_dir, "snapshot")test_file_name = "test_file"test_file = os.path.join(root_dir, test_file_name)os.makedirs(os.path.di...
1
17
2
139
0
334
363
334
self,temp_dir
[]
None
{"AnnAssign": 2, "Assign": 3, "Expr": 3, "With": 1}
8
30
8
["os.path.join", "os.path.join", "os.makedirs", "os.path.dirname", "open", "f.write", "_manifest_snapshot", "_manifest_snapshot"]
0
[]
The function (test_snapshot_diff_no_diff) defined within the public class called TestSnapshotAPI.The function start at line 334 and ends at 363. It contains 17 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [334.0] and does not return any value. It declares 8.0 functions, a...
aws-deadline_deadline-cloud
TestSnapshotAPI
public
0
0
test_snapshot_diff_no_diff_modified_mtime
def test_snapshot_diff_no_diff_modified_mtime(self, temp_dir):"""Create a snapshot with 1 file. Modify the mtime of the snapshot to simulate the attachment download operation.Snapshot again and diff. It should have no manifest."""# Given snapshot folder and 1 test fileroot_dir = os.path.join(temp_dir, "snapshot")test_f...
1
23
2
208
0
368
406
368
self,temp_dir
[]
None
{"AnnAssign": 2, "Assign": 5, "Expr": 4, "With": 2}
15
39
15
["os.path.join", "os.path.join", "os.makedirs", "os.path.dirname", "open", "f.write", "_manifest_snapshot", "open", "json.load", "len", "os.utime", "stat", "Path", "_manifest_snapshot", "_retry"]
0
[]
The function (test_snapshot_diff_no_diff_modified_mtime) defined within the public class called TestSnapshotAPI.The function start at line 368 and ends at 406. It contains 23 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [368.0] and does not return any value. It declares 1...