Skip to content

Conversation

@pared
Copy link
Contributor

@pared pared commented Dec 5, 2019

test_add_file_in_dir
test_readding_dir_should_not_unprotect_all
test_should_not_checkout_when_adding_cached_copy

  • ❗ Have you followed the guidelines in the Contributing to DVC list?

  • πŸ“– Check this box if this PR does not require documentation updates, or if it does and you have created a separate PR in dvc.org with such updates (or at least opened an issue about it in that repo). Please link below to your PR (or issue) in the dvc.org repo.

  • ❌ Have you checked DeepSource, CodeClimate, and other sanity checks below? We consider their findings recommendatory and don't expect everything to be addressed. Please review them carefully and fix those that actually improve code or fix bugs.

Thank you for the contribution - we'll try to review it as soon as possible. πŸ™

related to #2896

Started doing whole test_add, but iterations will probably be faster in batches, also reviewing 3 changed tests is easier than 20.

@pared pared requested a review from a user December 5, 2019 19:45
Copy link
Contributor

@Suor Suor Dec 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The order doesn't matter to python, but it matters to reader. Let's list fixtures in the same order everywhere: tmp_dir, scm (if used), dvc. This is chronological: temp dir is created, then git init, then dvc init.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add an empty line after tmp_dir.gen(), up to you.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other option:

tmp_dir.get("dir/new_file", "new_file_contents")

Less punctuation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace 3 lines with:

Suggested change
dvc.add("bar")
tmp_dir.dvc_gen({"foo": "foo", "bar": "bar"})

test_add_file_in_dir
test_readding_dir_should_not_unprotect_all
test_should_not_checkout_when_adding_cached_copy
@efiop efiop merged commit 9b6644a into treeverse:master Dec 6, 2019
@efiop efiop added the testing Related to the tests and the testing infrastructure label Dec 6, 2019
@pared pared deleted the 2896_add_1 branch December 17, 2019 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Related to the tests and the testing infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants