-
Notifications
You must be signed in to change notification settings - Fork 188
Validate Waveform Signals in Tests #894
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
Merged
Merged
Conversation
This file contains hidden or 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
Contributor
zhindes
approved these changes
Nov 29, 2025
1 task
bkeryan
requested changes
Dec 5, 2025
bkeryan
approved these changes
Dec 11, 2025
Collaborator
bkeryan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks correct. I would appreciate if @zhindes would take another look at the latest version before we merge this.
bkeryan
reviewed
Dec 11, 2025
zhindes
approved these changes
Dec 12, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've updated CHANGELOG.md if applicable.I've added tests applicable for this pull requestWhat does this Pull Request accomplish?
Investigating AB#3178052 revealed that the signal indices are supposed to be reversed compared to the data array indices. There were several# TODO: [AB#3178052](https://dev.azure.com/ni/94b22d7b-ad7b-4f5e-88f0-867910f91c94/_workitems/edit/3178052)comments in the nidaqmx-python digital waveform tests that were expecting this signal ordering behavior to be changed. But it turned out that the existing behavior was actually correct.This PR overhauls the digital waveform tests to use and expect the correct signal ordering (MSB first, with line numbers counting down instead of up) throughout.Inconftest.py, all the channel strings used withCHAN_FOR_ALL_LINESinadd_di_chan()have been reversed (using[::-1]), so they count down instead of up. (Note that this matches the behavior of port expansions)In_digital_utils.py, I updated_get_expected_data_for_lines()and_get_waveform_data()to interpret data as MSB (big-endian), to match the standard line/signal ordering. Also, I added_get_waveform_bitstrings()for tests where this is the best way to see the the expected values._get_waveform_data_msbto_get_waveform_port_data, since MSB is standard and correct for ports in waveforms.TODO: AB# 3178052comments_validate_waveform_signals()to all the tests that assert waveform data. This method verifies the signals' names and data.Why should this Pull Request be merged?
Our tests should use industry standard line/signal ordering, for clarity.We need to test the waveform signals.
What testing has been done?
All the tests pass.