From c178e77ab720cdc9687e14a0187bef8578f4091a Mon Sep 17 00:00:00 2001 From: "Mr. Outis" Date: Fri, 13 Dec 2019 17:39:01 -0600 Subject: [PATCH] tests/repo: use pytest --- tests/unit/test_repo.py | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/tests/unit/test_repo.py b/tests/unit/test_repo.py index ad7426154..f21c5a0f0 100644 --- a/tests/unit/test_repo.py +++ b/tests/unit/test_repo.py @@ -1,13 +1,6 @@ -import os - -from tests.basic_env import TestDvc +from dvc.utils.compat import fspath -class TestIsDvcInternal(TestDvc): - def test_return_false_on_non_dvc_file(self): - path = os.path.join("path", "to-non-.dvc", "file") - self.assertFalse(self.dvc.is_dvc_internal(path)) - - def test_return_true_on_dvc_internal_file(self): - path = os.path.join("path", "to", ".dvc", "file") - self.assertTrue(path) +def test_is_dvc_internal(tmp_dir, dvc): + assert dvc.is_dvc_internal(fspath(tmp_dir / ".dvc" / "file")) + assert not dvc.is_dvc_internal("file")