0631dce60b386a133f672f2934224c4918c2631c,app/tests/cases_tests/test_tiff.py,,test_image_builder_tiff,#Any#,273
Before Change
)
for file in expected_files:
assert file.name in [i.name for i in image_builder_result.new_images]
valid_tiff_pk = [
new_image.pk
for new_image in image_builder_result.new_images
After Change
def test_image_builder_tiff(tmpdir_factory,):
// Copy resource files to writable temp folder
temp_dir = Path(tmpdir_factory.mktemp("temp") / "resources")
output_dir = Path(tmpdir_factory.mktemp("output"))
shutil.copytree(
RESOURCE_PATH,
temp_dir,
ignore=shutil.ignore_patterns("dicom*", "complex_tiff", "dzi_tiff"),
)
files = [Path(d[0]).joinpath(f) for d in os.walk(temp_dir) for f in d[2]]
image_builder_result = image_builder_tiff(
files=files, output_directory=output_dir
)
expected_files = [
temp_dir / "valid_tiff.tif",
temp_dir / "no_dzi.tif",
]
assert sorted(image_builder_result.consumed_files) == sorted(
expected_files
)
file_to_pk = {i.name: i.pk for i in image_builder_result.new_images}
for file in expected_files:
pk = file_to_pk[file.name]
assert os.path.isfile(output_dir / str(pk) / f"{pk}.tif")
valid_tiff_pk = [
new_image.pk
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: comic/grand-challenge.org
Commit Name: 0631dce60b386a133f672f2934224c4918c2631c
Time: 2021-03-09
Author: 12661555+jmsmkn@users.noreply.github.com
File Name: app/tests/cases_tests/test_tiff.py
Class Name:
Method Name: test_image_builder_tiff
Project Name: nilearn/nilearn
Commit Name: e3d577b5595af3e1c9a05d3be84dbdf1a7c4aa20
Time: 2020-07-29
Author: jerome@dockes.org
File Name: nilearn/datasets/tests/test_atlas.py
Class Name:
Method Name: test_fetch_atlas_aal
Project Name: pantsbuild/pants
Commit Name: f7b260e965e277d62d2f54847671d06b1763fb21
Time: 2020-08-23
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/rules/coverage_integration_test.py
Class Name: CoverageIntegrationTest
Method Name: test_coverage_raw