Skip to content

Conversation

@algomaster99
Copy link
Contributor

@algomaster99 algomaster99 commented Nov 5, 2019

  • ❗ 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 addresses. 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. πŸ™

With reference: #2137
These changes test if contains_symlink_up_to can accept both str and Path like objects.

I have purposely added the patch.object decorator since I wanted to make the symlink true so that it comes out of recursion loop. There can be one addition to this test where we check for this condition as well - https://github.com/iterative/dvc/compare/master...algomaster99:test-arg-types-symlink?expand=1#diff-24be7b52326b428c2569724796020192R72. How to proceed with the latter? Resolved here - #2740 (comment)

@algomaster99 algomaster99 requested a review from efiop November 5, 2019 17:59
@algomaster99

This comment has been minimized.

@algomaster99 algomaster99 requested a review from efiop November 5, 2019 18:49
Copy link
Contributor

@efiop efiop left a comment

Choose a reason for hiding this comment

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

Perfect! Thank you!

@efiop efiop merged commit 9145dcd into treeverse:master Nov 5, 2019
@algomaster99 algomaster99 deleted the test-arg-types-symlink branch November 5, 2019 20:42
self.assertFalse(contains_symlink_up_to(target_path, base_path))
self.assertFalse(
contains_symlink_up_to(PathInfo(target_path), PathInfo(base_path))
)
Copy link
Contributor

@efiop efiop Nov 5, 2019

Choose a reason for hiding this comment

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

For the record: Could also add a case for one str and one path_info, but the current one is good enough :)

@Suor Suor mentioned this pull request Jan 8, 2020
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants