-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import url: test: migrate to dir helpers #3072
Conversation
tests/func/test_import_url.py
Outdated
src = repo_dir.DATA | ||
def test_import_url_to_dir(dname, tmp_dir, dvc): | ||
tmp_dir.gen({"data_dir": {"imported_file": "file content"}}) | ||
src = os.path.join("data_dir", "imported_file") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But src is not imported, dst is imported_file
. This is confusing. Also, instead of filecmp
please use read_text() == "something"
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
tests/func/test_import_url.py
Outdated
|
||
dst = os.path.join(dname, os.path.basename(src)) | ||
dst = os.path.join(dname, "file") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comment:
dst = os.path.join(dname, "file") | |
dst = tmp_dir / dname / "file" |
and then you could
stage.outs[0] == dst
and so on.
Co-Authored-By: Ruslan Kuprieiev <[email protected]>
Co-Authored-By: Ruslan Kuprieiev <[email protected]>
Co-Authored-By: Ruslan Kuprieiev <[email protected]>
For the record: tests failing due to unrelated changes. |
β 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. π