Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unit test cases for physical property access using mioDAQ #661

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion tests/component/system/test_physical_channel_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import pytest

from nidaqmx import DaqError
from nidaqmx.constants import TerminalConfiguration, UsageTypeAI
from nidaqmx.constants import LogicFamily, TerminalConfiguration, UsageTypeAI
from nidaqmx.error_codes import DAQmxErrors
from nidaqmx.system import PhysicalChannel
from tests.helpers import configure_teds
Expand Down Expand Up @@ -83,6 +83,21 @@ def test___physical_channel_with_teds___get_uint32_property___returns_configured
assert phys_chan.teds_mfg_id == 17


def test___physical_channel___get_int32_property___returns_value():
phys_chans = PhysicalChannel("mioDAQ/port0")

assert phys_chans.dig_port_logic_family in LogicFamily


@pytest.mark.library_only(
reason="AB#2375679: gRPC interpreter doesn't support setting physical channel property."
)
def test___physical_channel___set_int32_property___success():
phys_chans = PhysicalChannel("mioDAQ/port0")

phys_chans.dig_port_logic_family = LogicFamily.ONE_POINT_EIGHT_V


VALUES_IN_TED = [
17,
64,
Expand Down
7 changes: 7 additions & 0 deletions tests/max_config/nidaqmxMaxConfig.ini
Original file line number Diff line number Diff line change
Expand Up @@ -293,3 +293,10 @@ DevSerialNum = 0x0
DevIsSimulated = 1
CompactDAQ.ChassisDevName = cdaqChassisTester
CompactDAQ.SlotNum = 5

[DAQmxDevice mioDAQ]
ProductType = USB-6423
DevSerialNum = 0x0
DevIsSimulated = 1
ProductNum = 0x7B40
BusType = USB
Loading