Skip to content

Commit

Permalink
tests: local: unit: migrate to dir helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
pared committed Jan 14, 2020
1 parent 9cafef1 commit de9ff82
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/unit/output/test_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,27 @@ def test_save_missing(self):
o.save()


def test_str_workdir_outside_repo(erepo):
stage = Stage(erepo.dvc)
def test_str_workdir_outside_repo(erepo_dir):
stage = Stage(erepo_dir.dvc)
output = OutputLOCAL(stage, "path", cache=False)

assert relpath("path", erepo.dvc.root_dir) == str(output)
assert relpath("path", erepo_dir.dvc.root_dir) == str(output)


def test_str_workdir_inside_repo(dvc_repo):
stage = Stage(dvc_repo)
def test_str_workdir_inside_repo(dvc):
stage = Stage(dvc)
output = OutputLOCAL(stage, "path", cache=False)

assert "path" == str(output)

stage = Stage(dvc_repo, wdir="some_folder")
stage = Stage(dvc, wdir="some_folder")
output = OutputLOCAL(stage, "path", cache=False)

assert os.path.join("some_folder", "path") == str(output)


def test_str_on_absolute_path(dvc_repo):
stage = Stage(dvc_repo)
def test_str_on_absolute_path(dvc):
stage = Stage(dvc)

path = os.path.abspath(os.path.join("path", "to", "file"))
output = OutputLOCAL(stage, path, cache=False)
Expand Down

0 comments on commit de9ff82

Please sign in to comment.