-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #106 from Galvant/bugfixes
Bugfixes for #104
- Loading branch information
Showing
4 changed files
with
61 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Module containing tests for the base Instrument class | ||
""" | ||
|
||
# IMPORTS #################################################################### | ||
|
||
from __future__ import absolute_import | ||
|
||
from builtins import bytes | ||
|
||
# pylint: disable=unused-import | ||
from nose.tools import raises | ||
import quantities as pq | ||
|
||
import numpy as np | ||
|
||
import instruments as ik | ||
from instruments.tests import expected_protocol | ||
|
||
# TESTS ###################################################################### | ||
|
||
|
||
def test_instrument_binblockread(): | ||
with expected_protocol( | ||
ik.Instrument, | ||
[], | ||
[ | ||
b"#210" + bytes.fromhex("00000001000200030004") + b"0", | ||
], | ||
sep="\n" | ||
) as inst: | ||
np.testing.assert_array_equal(inst.binblockread(2), [0, 1, 2, 3, 4]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters