Skip to content

Commit dcf202b

Browse files
committed
- request_volume_for_slice update for separate download call
- test updates
1 parent e577bcd commit dcf202b

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

python/ouroboros/helpers/volume_cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def request_volume_for_slice(self, slice_index: int):
132132

133133
# Download the volume if it is not already cached
134134
if self.volumes[vol_index] is None:
135-
self.download_volume(vol_index, bounding_box)
135+
self.volumes[vol_index] = download_volume(self.cv, bounding_box, mip=self.mip)
136136

137137
# Remove the last requested volume if it is not to be cached
138138
if (

python/test/helpers/test_volume_cache.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -183,25 +183,6 @@ def test_request_volume_for_slice(volume_cache):
183183
assert np.all(volume_data == volume_cache.volumes[1])
184184

185185

186-
def test_create_processing_data(volume_cache):
187-
# Patch volume_cache.download to set the volume data
188-
with patch.object(volume_cache, "download_volume") as mock_download:
189-
190-
def mock_download_func(volume_index, bounding_box, parallel):
191-
volume_cache.volumes[volume_index] = bounding_box.to_empty_volume()
192-
193-
mock_download.side_effect = mock_download_func
194-
195-
# Call the method
196-
processing_data = volume_cache.create_processing_data(0)
197-
198-
# Check the return values
199-
assert processing_data[0] is not None
200-
assert processing_data[1] == volume_cache.bounding_boxes[0]
201-
assert processing_data[2] == [0]
202-
assert processing_data[3] == 0
203-
204-
205186
def test_get_mip_volume_sizes(mock_cloud_volume):
206187
with patch.object(mock_cloud_volume, "mip_volume_size") as mock_mip_volume_size:
207188
mock_mip_volume_size.return_value = (100, 100, 100)

0 commit comments

Comments
 (0)