Skip to content

Commit

Permalink
tried tearingdown FUTUREFLAG
Browse files Browse the repository at this point in the history
  • Loading branch information
ESadek-MO committed Dec 16, 2024
1 parent d79ad27 commit 2bb6e61
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/iris/_data_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def _deepcopy(self, memo, data=None):
try:
if iris.FUTURE.dataless_cube and data is None:
shape = self.shape
elif (iris.FUTURE.dataless_cube and data == iris.MAINTAIN_DATA) or (
elif (iris.FUTURE.dataless_cube and type(data) is str and data == iris.MAINTAIN_DATA) or (
data is None
):
# Copy the managed data.
Expand Down
12 changes: 6 additions & 6 deletions lib/iris/tests/unit/cube/test_Cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -2090,12 +2090,12 @@ def test_copy_new_data(self):
_shared_utils.assert_array_equal(new_cube.data, new_data)

def test_copy_remove_data(self):
iris.FUTURE.dataless_cube = True
cube = stock.realistic_4d_w_everything()
new_cube = cube.copy()
assert new_cube.metadata == cube.metadata
assert new_cube.data is None
assert new_cube.shape == cube.shape
with iris.FUTURE.context(dataless_cube = True):
cube = stock.simple_3d()
new_cube = cube.copy()
assert new_cube.metadata == cube.metadata
assert new_cube.data is None
assert new_cube.shape == cube.shape

def test__masked_emptymask(self):
cube = Cube(ma.array([0, 1]))
Expand Down

0 comments on commit 2bb6e61

Please sign in to comment.