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

example: use the tuple with the updated "in_compliance" value returned by _replace() #842

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

jayaseelan-james
Copy link
Contributor

@jayaseelan-james jayaseelan-james commented Aug 14, 2024

What does this Pull Request accomplish?

  • While expanding the nidcpower_source_dc_voltage measurement to support multisite in example: update nidcpower measurement to support multiple instrument sessions #676, I overlooked the update to the in_compliance value in the _Measurement tuple. Since tuples are immutable, invoking _replace() on a tuple doesn't modify the original tuple; instead, it returns a new tuple with the updated values.
  • In the current implementation, the object returned by the _replace() method wasn't captured or assigned to any variable, resulting in the use of the original tuple, which did not have the correct "in_compliance" value. This PR ensures that the tuple returned by the _replace() method is properly appended to the final measurements list.

Why should this Pull Request be merged?

  • Fixes the bug where the in_compliance value was not assigned properly.

What testing has been done?

  • Manually verified by running the measurement.

Copy link

Test Results

    30 files  ±0      30 suites  ±0   39m 8s ⏱️ - 1m 46s
   648 tests ±0     648 ✅ ±0      0 💤 ±0  0 ❌ ±0 
16 060 runs  ±0  14 990 ✅ ±0  1 070 💤 ±0  0 ❌ ±0 

Results for commit 767173c. ± Comparison against base commit ad51e4d.

@jayaseelan-james jayaseelan-james changed the title example: update the in_compliance value in the right way example: use the tuple returned with the in_compliance value from the _replace() method Aug 14, 2024
@jayaseelan-james jayaseelan-james changed the title example: use the tuple returned with the in_compliance value from the _replace() method example: use the tuple with the updated "in_compliance" value returned by _replace() Aug 14, 2024
@jayaseelan-james jayaseelan-james merged commit ecf5afa into main Aug 14, 2024
17 checks passed
@jayaseelan-james jayaseelan-james deleted the users/jay/update-incompliance-value branch August 14, 2024 17:16
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