Skip to content

Commit

Permalink
Merge pull request #170 from rassouly/visa_raw_fix
Browse files Browse the repository at this point in the history
VISA Raw connections fix
  • Loading branch information
MatthieuDartiailh committed Mar 30, 2020
2 parents 1feb5f1 + 304d8d5 commit 5fa213a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions exopy/instruments/connections/visa_connections.enaml
Expand Up @@ -30,6 +30,11 @@ enamldef VisaRaw(BaseConnection): main:
#: Full visa resource name. Can be an alias or an address added manually.
attr resource_name: str = ''

#: For compatibility with the other Visa connections
attr infos: list = ['resource_name']

title = 'VISA raw'

constraints = [hbox(rn_lab, rn_val)]

Label: rn_lab:
Expand Down
9 changes: 8 additions & 1 deletion tests/instruments/connections/test_visa_connections.py
Expand Up @@ -153,7 +153,14 @@ def test_creating_a_visa_connection(prof_plugin, exopy_qtbot, caplog):


@pytest.mark.parametrize('id, defaults, should_log',
[('VisaRS232',
[('VisaRaw',
{'resource_name': 'COM1'},
False),
('VisaRaw',
{'resource_name': 'COM1',
'bad': 1},
True),
('VisaRS232',
{'interface_type': 'ASRL',
'resource_class': 'INSTR',
'board': 1},
Expand Down

0 comments on commit 5fa213a

Please sign in to comment.