Repository navigation
test(S2): coverage back above main's, before the badge counts S2 - #284
Merged
Merged
Conversation
… leave untested Raise combined line coverage from 95.17% to 95.93%, above main's 95.68% before the S2 package counted: an invalid message answered as INVALID_DATA, messages given as JSON, failure callbacks, activating the control type in force or one the resource manager lacks, re-registering a control type, an empty schedule, and the example server's websocket producer and consumer (send, reset, bad JSON, close, connection error). Each test fails when the code it covers is broken (6 of 6 mutants killed). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CcpawsJs74cSwFLXkz7ZwW Signed-off-by: F.N. Claessen <claessen@seita.nl>
It measured wall-clock time against 0.5 s, and failed in 2 of 12 runs on a busy machine; the S2 job now also runs under coverage. In CPU time it takes 0.11 s, and 0.22 s under coverage, still well apart from the 1.7 s it guards against. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CcpawsJs74cSwFLXkz7ZwW Signed-off-by: F.N. Claessen <claessen@seita.nl>
Coverage Report for CI Build 42491472324Warning No base build found for commit Coverage: 95.932%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Into the integration branch
dev/s2-frbc-complete(#279), notmain.Answers the review request on #278: before the badge also covers S2, raise coverage to at least what
mainhad.Coverage, combined over the core and S2 test jobs (lines, as Coveralls counts them):
main(S2 omitted)dev/s2-frbc-completebefore this PRS2 alone goes to 96.0%.
New tests, each shown to fail when the code it covers is broken (6 of 6 mutants killed):
test_handler_base.py: an invalid message is answered asINVALID_DATAand never reaches its handler; messages given as JSON are handled and recognised; failure callbacks are stored with their arguments; activating the control type already in force, or one the resource manager lacks, sends nothing; registering a control type again replaces its handler; an empty schedule gives no instructions.test_example_server_websocket.py: the example server's producer sends what the CEM queues and stops when the connection is reset; its consumer hands messages to the CEM, logs one that is not JSON and carries on, closes onclose, and closes the CEM on a connection error.One test made robust:
test_a_long_schedule_against_a_detailed_forecast_is_translated_quicklymeasured wall-clock time against 0.5 s, and failed in 2 of 12 local runs on a busy machine. With the S2 job now running under coverage, it would flake in CI too. It now measures CPU time: 0.11 s, or 0.22 s under coverage, against the 1.7 s it guards against.What stays uncovered is mostly older code:
FillRateBasedControlTUNES(45 lines) and the core client's retry paths (39 lines).🤖 Generated with Claude Code
https://claude.ai/code/session_01CcpawsJs74cSwFLXkz7ZwW