Files
cleveragents-core/features/coverage_improvements.feature
T

44 lines
1.5 KiB
Gherkin

Feature: Improve Code Coverage
As a developer
I want to increase test coverage for uncovered code paths
So that the codebase is thoroughly tested
@coverage
Scenario: Test __main__ module direct execution
When I test the __main__ module if name equals main block
Then the sys.exit should be called with the run return value
@coverage
Scenario: Test platform module when module needs importing
Given I remove "cleveragents.cli" from sys.modules
When I test ensure_cli_importable with missing module
Then the module should be freshly imported
@coverage
Scenario: Test CLI main function pass statement
When I call the CLI main function with no commands
Then the function should complete without error
@coverage
Scenario: Test exit code normalization with negative code
Given the CLI returns a negative exit code -5
When I normalize the exit code
Then the normalized code should be -5
@coverage
Scenario: Test exit code normalization with code over 255
Given the CLI returns an exit code 300
When I normalize the exit code
Then the normalized code should be 255
@coverage
Scenario: Test exit code normalization with None returning 0
Given the CLI returns None as exit code
When I normalize the exit code
Then the normalized code should be 0
@coverage
Scenario: Test exit code normalization with invalid string
Given the CLI returns "invalid" as exit code
When I normalize the exit code
Then the normalized code should be 1