-
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
tests: api: convert to dir helpers #3044
Conversation
|
||
|
||
# TODO: simplify, we shouldn't need run. |
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.
I don't think there is an easy way to have a non-cached file without run
, an alternative could be add
-ing and modifying stage file, but that is artificial, and probably will not require less work than run
.
This comment has been minimized.
This comment has been minimized.
tests/func/test_api.py
Outdated
|
||
with pytest.raises(FileMissingError): | ||
api.read("foo") | ||
api.read("foo", repo=fspath(erepo_dir)) |
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.
This one uses dir helpers already, no need to complicate it.
tests/func/test_api.py
Outdated
# TODO: simplify, we shouldn't need run. | ||
def test_open_not_cached(dvc): | ||
metric_file = "metric.txt" | ||
def test_open_not_cached(dvc, erepo_dir, monkeypatch): |
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.
No need to use erepo_dir
here.
β 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. π