BF: test_addurls: Avoid modifying shared test data#5674
Merged
kyleam merged 1 commit intodatalad:maintfrom May 19, 2021
Merged
Conversation
kyleam
added a commit
to kyleam/datalad
that referenced
this pull request
May 19, 2021
1 task
Codecov Report
@@ Coverage Diff @@
## maint #5674 +/- ##
==========================================
- Coverage 90.30% 85.01% -5.29%
==========================================
Files 299 296 -3
Lines 42348 42331 -17
==========================================
- Hits 38242 35989 -2253
- Misses 4106 6342 +2236
Continue to review full report at Codecov.
|
test_addurls_row_missing_key_fields() makes a shallow copy of the `data` attribute (list of dictionaries) exposed to all TestAddurls tests and then modifies one of the dictionaries to remove a key, which of course modifies the row in TestAddurls.data. Make a deep copy to avoid interfering with other tests.
a377a29 to
1bad217
Compare
Contributor
Author
|
I think this one's uncontroversial. Will merge to unblock gh-5675 |
yarikoptic
approved these changes
May 19, 2021
8 tasks
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.
test_addurls_row_missing_key_fields() makes a shallow copy of the
dataattribute (list of dictionaries) exposed to all TestAddurlstests and then modifies one of the dictionaries to remove a key, which
of course modifies the row in TestAddurls.data.
Make a deep copy to avoid interfering with other tests.
As far as I know, this doesn't trigger any failures right now, but it will in an upcoming PR (against master).