Skip to content

Commit d2e7efc

Browse files
authored
Add unit test cases for physical property access using mioDAQ (#661)
* Add unit test cases for physical property access using mioDAQ * Add azdo work item
1 parent 778fa9e commit d2e7efc

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

tests/component/system/test_physical_channel_properties.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import pytest
33

44
from nidaqmx import DaqError
5-
from nidaqmx.constants import TerminalConfiguration, UsageTypeAI
5+
from nidaqmx.constants import LogicFamily, TerminalConfiguration, UsageTypeAI
66
from nidaqmx.error_codes import DAQmxErrors
77
from nidaqmx.system import PhysicalChannel
88
from tests.helpers import configure_teds
@@ -83,6 +83,21 @@ def test___physical_channel_with_teds___get_uint32_property___returns_configured
8383
assert phys_chan.teds_mfg_id == 17
8484

8585

86+
def test___physical_channel___get_int32_property___returns_value():
87+
phys_chans = PhysicalChannel("mioDAQ/port0")
88+
89+
assert phys_chans.dig_port_logic_family in LogicFamily
90+
91+
92+
@pytest.mark.library_only(
93+
reason="AB#2375679: gRPC interpreter doesn't support setting physical channel property."
94+
)
95+
def test___physical_channel___set_int32_property___success():
96+
phys_chans = PhysicalChannel("mioDAQ/port0")
97+
98+
phys_chans.dig_port_logic_family = LogicFamily.ONE_POINT_EIGHT_V
99+
100+
86101
VALUES_IN_TED = [
87102
17,
88103
64,

tests/max_config/nidaqmxMaxConfig.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,3 +293,10 @@ DevSerialNum = 0x0
293293
DevIsSimulated = 1
294294
CompactDAQ.ChassisDevName = cdaqChassisTester
295295
CompactDAQ.SlotNum = 5
296+
297+
[DAQmxDevice mioDAQ]
298+
ProductType = USB-6423
299+
DevSerialNum = 0x0
300+
DevIsSimulated = 1
301+
ProductNum = 0x7B40
302+
BusType = USB

0 commit comments

Comments
 (0)