Skip to content

Add tests for multi_parameter and multi_function methods - #7687

Merged
Jens Hedegaard Nielsen (jenshnielsen) merged 2 commits into
jenshnielsen/add_channel_typefrom
copilot/sub-pr-7686
Dec 4, 2025
Merged

Add tests for multi_parameter and multi_function methods#7687
Jens Hedegaard Nielsen (jenshnielsen) merged 2 commits into
jenshnielsen/add_channel_typefrom
copilot/sub-pr-7686

Conversation

Copilot AI commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

Adds test coverage for the new multi_parameter and multi_function methods in ChannelTuple as requested in #7686.

Tests added

  • multi_parameter: Valid parameter lookup returns MultiChannelInstrumentParameter, invalid name raises AttributeError, empty channel tuple raises AttributeError
  • multi_function: Valid function lookup returns callable, callable invokes function on all channels, works with method arguments, invalid name raises AttributeError

Example usage

# Type-safe parameter access
temp_param = dci.channels.multi_parameter("temperature")
temperatures = temp_param.get()  # Returns tuple of all channel temperatures

# Type-safe function access  
multi_func = dci.channels.multi_function("log_my_name")
multi_func()  # Calls log_my_name on all channels
  • Short description included
  • Automatic tests added
  • Changelog entry (not needed - tests only)

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: jenshnielsen <548266+jenshnielsen@users.noreply.github.com>
Copilot AI changed the title [WIP] Add tests for multi_parameter and multi_function methods Add tests for multi_parameter and multi_function methods Dec 4, 2025
@jenshnielsen
Jens Hedegaard Nielsen (jenshnielsen) marked this pull request as ready for review December 4, 2025 09:36
@codecov

codecov Bot commented Dec 4, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.79%. Comparing base (2b33205) to head (6c44af9).
⚠️ Report is 3 commits behind head on jenshnielsen/add_channel_type.

Additional details and impacted files
@@                        Coverage Diff                        @@
##           jenshnielsen/add_channel_type    #7687      +/-   ##
=================================================================
+ Coverage                          59.74%   59.79%   +0.05%     
=================================================================
  Files                                352      352              
  Lines                              31681    31681              
=================================================================
+ Hits                               18927    18944      +17     
+ Misses                             12754    12737      -17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jenshnielsen
Jens Hedegaard Nielsen (jenshnielsen) merged commit 3614d2f into jenshnielsen/add_channel_type Dec 4, 2025
21 of 32 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