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

Tests: improve coverage of NodeScanner #517

Merged

Conversation

erlend-aasland
Copy link
Contributor

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Jul 11, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.05%. Comparing base (a196e1e) to head (e6921a4).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #517      +/-   ##
==========================================
+ Coverage   68.86%   69.05%   +0.19%     
==========================================
  Files          26       26              
  Lines        3112     3112              
  Branches      526      526              
==========================================
+ Hits         2143     2149       +6     
+ Misses        831      825       -6     
  Partials      138      138              

see 1 file with indirect coverage changes

@erlend-aasland erlend-aasland changed the title Tests: improve coverage of canopen.network.NodeScanner Tests: improve coverage of NodeScanner Jul 11, 2024
@erlend-aasland erlend-aasland mentioned this pull request Jul 11, 2024
23 tasks
test/test_network.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@acolomb acolomb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looked at the code on a high level, and it seems to do sensible things. Let's get this merged and take care of any fallout when it occurs (none expected though).

@acolomb acolomb merged commit d1c28e5 into christiansandberg:master Aug 6, 2024
3 checks passed
@acolomb
Copy link
Collaborator

acolomb commented Aug 6, 2024

Seems flaky... Maybe I shouldn't have written that no troubles are expected? It failed immediately when testing the merge commit on master.

@erlend-aasland could you please investigate?

@erlend-aasland
Copy link
Contributor Author

Seems flaky... [..] could you please investigate?

Sure; I'll get to it in a day or two.

@erlend-aasland erlend-aasland deleted the test/scanner-coverage branch August 6, 2024 21:58
@erlend-aasland
Copy link
Contributor Author

test_scanner_search assumes all packets arrive sequentially, however that does not seem to be guaranteed by python-can. There is no need to check the order of the packages; we only need to check that all of them are sent. I'll rewrite the test to drop the sequential aspect.

acolomb pushed a commit that referenced this pull request Aug 11, 2024
This fixes up the tests added with #517 (commit
d1c28e5).
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.

3 participants