-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
fix: disconnect connected buses at end of tests #25
Conversation
Codecov ReportBase: 80.88% // Head: 81.19% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #25 +/- ##
==========================================
+ Coverage 80.88% 81.19% +0.31%
==========================================
Files 24 24
Lines 2835 2835
Branches 616 616
==========================================
+ Hits 2293 2302 +9
+ Misses 334 327 -7
+ Partials 208 206 -2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
This change also seems to have dropped the number of warnings in the pytest log about unexpected disconnects and unclosed resources from ~28 to ~7 (depending on the version). Fwiw there was only one test that connected a bus which I did not change and that was this one: dbus-fast/tests/test_tcp_address.py Lines 12 to 71 in cfad28b
It seemed to be testing what happened when the socket was closed on the bus so I didn't want to change that one around. |
Last build failed for confusing reasons. I suspect from the error the real reason is something not being released between tests. Adding a call to
bus.disconnect
at the end of every test which connects to the bus seems to fix it.