Skip to content
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

Merged
merged 4 commits into from
Jan 6, 2020
Merged

tests: api: convert to dir helpers #3044

merged 4 commits into from
Jan 6, 2020

Conversation

pared
Copy link
Contributor

@pared pared commented Jan 3, 2020

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



# TODO: simplify, we shouldn't need run.
Copy link
Contributor Author

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.

@pared pared requested review from Suor and efiop January 3, 2020 10:34
@pared pared changed the title tests: api: convert to dir helpers [WIP] tests: api: convert to dir helpers Jan 3, 2020
@pared

This comment has been minimized.


with pytest.raises(FileMissingError):
api.read("foo")
api.read("foo", repo=fspath(erepo_dir))
Copy link
Contributor

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.

# 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):
Copy link
Contributor

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.

@pared pared requested a review from Suor January 3, 2020 14:33
@pared pared changed the title [WIP] tests: api: convert to dir helpers tests: api: convert to dir helpers Jan 3, 2020
@efiop efiop merged commit 8041d70 into iterative:master Jan 6, 2020
@pared pared deleted the 2896_api branch March 24, 2020 09:37
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.

3 participants