Skip to content

Conversation

@erlend-aasland
Copy link
Contributor

No description provided.

@erlend-aasland

This comment was marked as outdated.

@codecov-commenter
Copy link

codecov-commenter commented Jul 10, 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 70.17%. Comparing base (a196e1e) to head (d8d8d3c).

❗ 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     #515      +/-   ##
==========================================
+ Coverage   68.86%   70.17%   +1.31%     
==========================================
  Files          26       26              
  Lines        3112     3112              
  Branches      526      526              
==========================================
+ Hits         2143     2184      +41     
+ Misses        831      800      -31     
+ Partials      138      128      -10     

see 5 files with indirect coverage changes

@erlend-aasland erlend-aasland force-pushed the test/network-coverage branch from 6fbb82a to 37a28d6 Compare July 11, 2024 07:32
@erlend-aasland erlend-aasland marked this pull request as ready for review July 11, 2024 07:32
Comment on lines +49 to +51
# Will err because we're not connected to a real network.
with self.assertLogs(level=logging.ERROR):
self.network.add_node(2, SAMPLE_EDS, upload_eds=True)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test can be enhanced for example by mocking canopen.sdo.SdoClient.open to return a pre-filled StringIO buffer.

@erlend-aasland erlend-aasland mentioned this pull request Jul 11, 2024
23 tasks
@erlend-aasland erlend-aasland changed the title Tests: improve coverage of canopen.Network Tests: improve coverage of Network Jul 11, 2024
Copy link
Member

@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.

I haven't checked every detail, but the code looks sensible, clean and appears to test the relevant bits. Fine with me, let's take a closer look when something should ever fail.

@acolomb acolomb merged commit 7d7e2f1 into canopen-python:master Aug 6, 2024
@erlend-aasland
Copy link
Contributor Author

Thank you for the review!

@erlend-aasland erlend-aasland deleted the test/network-coverage branch August 6, 2024 21:58
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