Commit 11eafc03 authored by Vincent Michel's avatar Vincent Michel

Fix get_raw_buffer tests

parent a47641b5
Pipeline #1268 passed with stages
in 1 minute and 20 seconds
......@@ -382,16 +382,15 @@ def test_get_raw_buffer(interface):
def side_effect(channel, dtype, arg):
if dtype == b'buffer_len':
arg[0] = 10
arg[0] = 5
return 0
if dtype == b'buffer_a':
for x in range(10):
arg[x] = x
arg[0:5] = range(1, 6)
return 0
assert False
m.side_effect = side_effect
expected = numpy.array(range(10), dtype='uint32')
expected = numpy.array(range(1, 6), dtype='uint32')
diff = interface.get_raw_buffer(1, 'a') == expected
assert diff.all()
m.assert_called()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment