Repository navigation
Conversation
…pers Add unit tests for merge_transactions_deduped and the parse_position_* helpers, which had no direct coverage. Test-only change. Co-authored-by: herklos.dev <herklos.dev@protonmail.com>
This branch has not been deployed
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.
Thank you for sending your pull request.
But first, have you included unit tests, and is your code PEP8 conformant? More details
Summary
Add direct unit tests for two pure trading helpers that had no coverage:
merge_transactions_dedupedand theparse_position_*helpers. Test-only change, no production code touched.Solve the issue: none
Changelog
merge_transactions_deduped(ordering, dedup against existing and within new, input immutability)parse_position_status,parse_position_side,parse_position_margin_type,parse_position_mode(known values and missing key)What's new?
Nightly tests audit (aspect: tests missing for critical paths).
merge_transactions_dedupedfeeds the portfolio history and account state merges inpackages/flow, so dedup regressions would double-count transactions. Theparse_position_*helpers turn exchange position rows into enums during position creation and had no direct tests.Scope is limited to two new test files under
packages/trading/tests/personal_data/. No existing test or source file is modified.Verification:
pytest packages/trading/tests/personal_data -n autofrompackages/trading: 801 passed.continueon duplicate TXIDs makes 2 new tests fail.python -m tools.extended_linter --base origin/dev: 0 violations.