File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -169,6 +169,9 @@ def test_extend_array(tree):
169169 ac .patch (ones * 8 , offset = 8 , extend = True )
170170 numpy .testing .assert_equal (ac [8 :9 ], ones * 8 )
171171
172+ with fail_with_status_code (HTTP_409_CONFLICT ):
173+ ac .patch (ones .astype ("uint8" ), offset = 9 , extend = True )
174+
172175
173176def test_write_dataframe_full (tree ):
174177 with Context .from_app (
Original file line number Diff line number Diff line change @@ -206,6 +206,11 @@ async def patch(
206206 If slice does not fit wholly with the shape of the existing array
207207 and expand is False
208208 """
209+ if data .dtype != self ._array .dtype :
210+ raise Conflicts (
211+ f"Patch data type { data .dtype } does not match array data type "
212+ f"{ self ._array .dtype } ."
213+ )
209214 current_shape = self ._array .shape
210215 normalized_offset = [0 ] * len (current_shape )
211216 normalized_offset [: len (offset )] = list (offset )
You can’t perform that action at this time.
0 commit comments