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 AI TEDS create channel tests #490

Merged
merged 9 commits into from
Feb 7, 2024

Conversation

zhindes
Copy link
Collaborator

@zhindes zhindes commented Feb 6, 2024

What does this Pull Request accomplish?

This adds a test per TEDS AI create channel method to validate that they can successfully be used. There is a small amount of functional validation that parameters are properly being passed through the layers of Python and underlying driver API.

Why should this Pull Request be merged?

This will give us confidence that we haven't broken anything as we refactor parts of the Python and driver stack.

What testing has been done?

$ poetry run ni-python-styleguide fix tests && poetry run ni-python-styleguide lint tests && poetry run pytest -rs -k teds
=============================== test session starts ===============================
platform win32 -- Python 3.10.10, pytest-7.4.2, pluggy-1.3.0
rootdir: C:\dev\nidaqmx-python
configfile: pyproject.toml
testpaths: tests
plugins: cov-4.1.0, mock-3.11.1
collected 1431 items / 1357 deselected / 74 selected

tests\component\_task_modules\channels\test_ai_channel.py .................. [ 24%]
......................................                                       [ 75%]
tests\component\system\test_physical_channel.py ........                     [ 86%]
tests\component\system\test_physical_channel_properties.py ........          [ 97%]
tests\legacy\test_teds.py ..                                                 [100%]

======================= 74 passed, 1357 deselected in 3.03s =======================

@zhindes zhindes changed the title Users/zhindes/create channel tests2 Add AI TEDS create channel tests Feb 6, 2024
@zhindes zhindes marked this pull request as ready for review February 6, 2024 19:12
Copy link

github-actions bot commented Feb 6, 2024

Test Results

    30 files  ±  0      30 suites  ±0   35m 9s ⏱️ + 1m 5s
 1 432 tests + 52   1 252 ✅ + 52    180 💤 ±0  0 ❌ ±0 
22 110 runs  +780  19 490 ✅ +780  2 620 💤 ±0  0 ❌ ±0 

Results for commit 2fecaba. ± Comparison against base commit 1305bc1.

This pull request removes 138 and adds 190 tests. Note that renamed tests count towards both.
tests.component._task_modules.channels.test_ai_channel ‑ test___task__add_ai_accel_4_wire_dc_voltage_chan___sets_channel_attributes[grpc_init_kwargs-AccelUnits.G-1000.0-AccelSensitivityUnits.MILLIVOLTS_PER_G]
tests.component._task_modules.channels.test_ai_channel ‑ test___task__add_ai_accel_4_wire_dc_voltage_chan___sets_channel_attributes[grpc_init_kwargs-AccelUnits.METERS_PER_SECOND_SQUARED-0.5-AccelSensitivityUnits.VOLTS_PER_G]
tests.component._task_modules.channels.test_ai_channel ‑ test___task__add_ai_accel_4_wire_dc_voltage_chan___sets_channel_attributes[library_init_kwargs-AccelUnits.G-1000.0-AccelSensitivityUnits.MILLIVOLTS_PER_G]
tests.component._task_modules.channels.test_ai_channel ‑ test___task__add_ai_accel_4_wire_dc_voltage_chan___sets_channel_attributes[library_init_kwargs-AccelUnits.METERS_PER_SECOND_SQUARED-0.5-AccelSensitivityUnits.VOLTS_PER_G]
tests.component._task_modules.channels.test_ai_channel ‑ test___task__add_ai_accel_chan___sets_channel_attributes[grpc_init_kwargs-AccelUnits.G-1000.0-AccelSensitivityUnits.MILLIVOLTS_PER_G]
tests.component._task_modules.channels.test_ai_channel ‑ test___task__add_ai_accel_chan___sets_channel_attributes[grpc_init_kwargs-AccelUnits.METERS_PER_SECOND_SQUARED-0.5-AccelSensitivityUnits.VOLTS_PER_G]
tests.component._task_modules.channels.test_ai_channel ‑ test___task__add_ai_accel_chan___sets_channel_attributes[library_init_kwargs-AccelUnits.G-1000.0-AccelSensitivityUnits.MILLIVOLTS_PER_G]
tests.component._task_modules.channels.test_ai_channel ‑ test___task__add_ai_accel_chan___sets_channel_attributes[library_init_kwargs-AccelUnits.METERS_PER_SECOND_SQUARED-0.5-AccelSensitivityUnits.VOLTS_PER_G]
tests.component._task_modules.channels.test_ai_channel ‑ test___task__add_ai_accel_charge_chan___sets_channel_attributes[grpc_init_kwargs-AccelUnits.G-100.0-AccelChargeSensitivityUnits.PICO_COULOMBS_PER_G]
tests.component._task_modules.channels.test_ai_channel ‑ test___task__add_ai_accel_charge_chan___sets_channel_attributes[grpc_init_kwargs-AccelUnits.METERS_PER_SECOND_SQUARED-0.5-AccelChargeSensitivityUnits.PICO_COULOMBS_PER_METERS_PER_SECOND_SQUARED]
…
tests.component._task_modules.channels.test_ai_channel ‑ test___task___add_ai_accel_4_wire_dc_voltage_chan___sets_channel_attributes[grpc_init_kwargs-AccelUnits.G-1000.0-AccelSensitivityUnits.MILLIVOLTS_PER_G]
tests.component._task_modules.channels.test_ai_channel ‑ test___task___add_ai_accel_4_wire_dc_voltage_chan___sets_channel_attributes[grpc_init_kwargs-AccelUnits.METERS_PER_SECOND_SQUARED-0.5-AccelSensitivityUnits.VOLTS_PER_G]
tests.component._task_modules.channels.test_ai_channel ‑ test___task___add_ai_accel_4_wire_dc_voltage_chan___sets_channel_attributes[library_init_kwargs-AccelUnits.G-1000.0-AccelSensitivityUnits.MILLIVOLTS_PER_G]
tests.component._task_modules.channels.test_ai_channel ‑ test___task___add_ai_accel_4_wire_dc_voltage_chan___sets_channel_attributes[library_init_kwargs-AccelUnits.METERS_PER_SECOND_SQUARED-0.5-AccelSensitivityUnits.VOLTS_PER_G]
tests.component._task_modules.channels.test_ai_channel ‑ test___task___add_ai_accel_chan___sets_channel_attributes[grpc_init_kwargs-AccelUnits.G-1000.0-AccelSensitivityUnits.MILLIVOLTS_PER_G]
tests.component._task_modules.channels.test_ai_channel ‑ test___task___add_ai_accel_chan___sets_channel_attributes[grpc_init_kwargs-AccelUnits.METERS_PER_SECOND_SQUARED-0.5-AccelSensitivityUnits.VOLTS_PER_G]
tests.component._task_modules.channels.test_ai_channel ‑ test___task___add_ai_accel_chan___sets_channel_attributes[library_init_kwargs-AccelUnits.G-1000.0-AccelSensitivityUnits.MILLIVOLTS_PER_G]
tests.component._task_modules.channels.test_ai_channel ‑ test___task___add_ai_accel_chan___sets_channel_attributes[library_init_kwargs-AccelUnits.METERS_PER_SECOND_SQUARED-0.5-AccelSensitivityUnits.VOLTS_PER_G]
tests.component._task_modules.channels.test_ai_channel ‑ test___task___add_ai_accel_charge_chan___sets_channel_attributes[grpc_init_kwargs-AccelUnits.G-100.0-AccelChargeSensitivityUnits.PICO_COULOMBS_PER_G]
tests.component._task_modules.channels.test_ai_channel ‑ test___task___add_ai_accel_charge_chan___sets_channel_attributes[grpc_init_kwargs-AccelUnits.METERS_PER_SECOND_SQUARED-0.5-AccelChargeSensitivityUnits.PICO_COULOMBS_PER_METERS_PER_SECOND_SQUARED]
…

♻️ This comment has been updated with latest results.

tests/component/_task_modules/channels/test_ai_channel.py Outdated Show resolved Hide resolved
tests/helpers.py Outdated Show resolved Hide resolved
tests/component/_task_modules/channels/test_ai_channel.py Outdated Show resolved Hide resolved
tests/conftest.py Outdated Show resolved Hide resolved
tests/conftest.py Outdated Show resolved Hide resolved
tests/component/_task_modules/channels/test_ai_channel.py Outdated Show resolved Hide resolved
@zhindes zhindes requested a review from bkeryan February 7, 2024 17:07
@zhindes zhindes enabled auto-merge (squash) February 7, 2024 17:07
@zhindes zhindes merged commit 7119a3f into master Feb 7, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants