test(ingestion): assert the fixed Excel behaviour, not the defect - #485
Open
kevincostner17 wants to merge 1 commit into
Open
kevincostner17 wants to merge 1 commit into
kevincostner17 wants to merge 1 commit into
Conversation
main went red at c0fbb08: 7064 passed, 2 failed. #478 found that preserve_leading_zeros was a no-op for clean_excel and, following the repo's convention of not using xfail, pinned the defect as it behaved: assert list(fd.clean_excel(xlsx)["zip"]) == [2134, 501, 10001] # DEFECT #480 then fixed that defect. Each PR was green on its own branch, and each was rebased on a main that did not contain the other, so nothing caught the pair until both had landed. The two assertions were tripwires for the fix, and the fix duly tripped them. Both now assert the repaired behaviour, and each docstring keeps the history so the tests still explain why they exist. The round-trip case gains nothing artificial -- it simply asserts that the Excel hop no longer undoes a correct CSV clean, which is the property that was missing in the first place. The opt-out and explicit-dtype paths are asserted alongside, so the fix cannot drift into applying unconditionally. Full suite 7066 passed / 0 failed, coverage 94.21%; ruff clean repo-wide.
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
main is red — this fixes it
mainatc0fbb08: 7064 passed, 2 failed.Why
#478 found that
preserve_leading_zeroswas a no-op forclean_exceland — following the repo's convention of not usingxfail— pinned the defect as it behaved:#480 then fixed that defect.
Each PR was green on its own branch, and each was rebased on a
mainthat did not contain the other, so nothing caught the pair until both had landed. Those two assertions were tripwires for the fix, and the fix duly tripped them.The change
Both assertions now describe the repaired behaviour, and each docstring keeps the history so the tests still explain why they exist.
The round-trip case gains nothing artificial — it simply asserts that the Excel hop no longer undoes a correct CSV clean, which is the property that was missing in the first place. The opt-out (
preserve_leading_zeros=False) and explicit-dtypepaths are asserted alongside, so the fix cannot drift into applying unconditionally.Verification
tests/test_ingestion_roundtrip.py: 22 passed.ruff check .clean repo-wide.Process note
A green CI check on each PR independently is not evidence that
mainwill be green after both land. When a test pins a defect as current behaviour, it is a merge-order dependency — the second of the pair needs a rebase onto the first and a re-run before merging.