fix: Remove dead if sequence is None check and fix impossible test mocks#16
Open
Devguru-codes wants to merge 1 commit intoOSIPI:mainfrom
Open
fix: Remove dead if sequence is None check and fix impossible test mocks#16Devguru-codes wants to merge 1 commit intoOSIPI:mainfrom
if sequence is None check and fix impossible test mocks#16Devguru-codes wants to merge 1 commit intoOSIPI:mainfrom
Conversation
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.
get_sequence()infactory.pynever returnsNone— all code paths either return a valid sequence object or raiseValueError. This means:if sequence is Noneguard inmain.py:34is dead code that can never execute.get_sequenceto returnNone, creating impossible test scenarios that don't reflect actual behavior.Fix
if sequence is Nonecheck frommain.py.side_effect=ValueError(...)instead ofreturn_value=Noneto test real failure behavior.Files Changed
package/src/pyaslreport/main.pypackage/src/pyaslreport/tests/test_package.pyBefore/After Comparison
mainbranch (before fix)get_sequencecan return Nonemain.pyhas deadif sequence is Nonecheckget_sequencewithreturn_value=NoneSummary: PASSED=0 FAILED=3
issue13branch (after fix)get_sequenceraises ValueError on failure (never returns None)main.pyhas deadif sequence is Nonecheckget_sequencewithreturn_value=Noneside_effect=ValueErrorSummary: PASSED=3 FAILED=0
Resolves #15