Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bliss
python-handel
Commits
11eafc03
Commit
11eafc03
authored
Oct 27, 2017
by
Vincent Michel
Browse files
Fix get_raw_buffer tests
parent
a47641b5
Pipeline
#1268
passed with stages
in 1 minute and 20 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tests/test_interface.py
View file @
11eafc03
...
...
@@ -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
(
1
0
),
dtype
=
'uint32'
)
expected
=
numpy
.
array
(
range
(
1
,
6
),
dtype
=
'uint32'
)
diff
=
interface
.
get_raw_buffer
(
1
,
'a'
)
==
expected
assert
diff
.
all
()
m
.
assert_called
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment