Skip to content

Commit 6d711f1

Browse files
committed
fix tests
1 parent e0c2998 commit 6d711f1

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

webknossos/tests/dataset/test_attachments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def test_fs_copy_layer(tmp_upath: UPath) -> None:
214214
)
215215

216216
copy_dataset = Dataset(tmp_upath / "test_copy", voxel_size=(10, 10, 10))
217-
copy_layer = copy_dataset.add_fs_copy_layer(seg_layer).as_segmentation_layer()
217+
copy_layer = copy_dataset.add_layer_as_copy(seg_layer).as_segmentation_layer()
218218

219219
# has been copied
220220
assert (

webknossos/tests/dataset/test_dataset.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2116,7 +2116,7 @@ def test_add_fs_copy_mag(data_format: DataFormat, output_path: UPath) -> None:
21162116
)
21172117

21182118
with mock.patch.object(
2119-
copy_layer, "add_fs_copy_mag", wraps=copy_layer.add_fs_copy_mag
2119+
copy_layer, "_add_fs_copy_mag", wraps=copy_layer._add_fs_copy_mag
21202120
) as mocked_method:
21212121
copy_mag = copy_layer.add_mag_as_copy(
21222122
original_mag, extend_layer_bounding_box=True
@@ -3542,9 +3542,7 @@ def test_zarr_copy_to_remote_dataset(data_format: DataFormat) -> None:
35423542

35433543
@pytest.mark.parametrize("input_path", OUTPUT_PATHS)
35443544
@pytest.mark.parametrize("output_path", OUTPUT_PATHS)
3545-
def test_fs_copy_dataset_with_attachments(
3546-
input_path: UPath, output_path: UPath
3547-
) -> None:
3545+
def test_copy_dataset_with_attachments(input_path: UPath, output_path: UPath) -> None:
35483546
ds_path = copy_simple_dataset(DEFAULT_DATA_FORMAT, input_path)
35493547
new_ds_path = prepare_dataset_path(DEFAULT_DATA_FORMAT, output_path, "copied")
35503548

@@ -3571,7 +3569,7 @@ def test_fs_copy_dataset_with_attachments(
35713569
)
35723570

35733571
# Copy
3574-
copy_ds = ds.fs_copy_dataset(new_ds_path)
3572+
copy_ds = ds.copy_dataset(new_ds_path)
35753573

35763574
assert (
35773575
copy_ds.default_view_configuration

webknossos/webknossos/dataset/layer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ def add_mag_as_copy(
905905
logger.debug(
906906
f"Optimization: Copying files from {foreign_mag_view.path} to {self.path}/{foreign_mag_view.mag} directly without re-encoding."
907907
)
908-
return self.add_fs_copy_mag(
908+
return self._add_fs_copy_mag(
909909
foreign_mag_view,
910910
extend_layer_bounding_box=extend_layer_bounding_box,
911911
exists_ok=exists_ok,

0 commit comments

Comments
 (0)