Files
dvc/tests/unit/scm/test_git.py
T
Ruslan Kuprieiev 918ef646dc appveyor: test py2 and py3
Related to #2166

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-06-23 13:33:47 +03:00

18 lines
591 B
Python

import os
from tests.basic_env import TestDvcGit
class TestGit(TestDvcGit):
def test_belongs_to_scm_true_on_gitignore(self):
path = os.path.join("path", "to", ".gitignore")
self.assertTrue(self.dvc.scm.belongs_to_scm(path))
def test_belongs_to_scm_true_on_git_internal(self):
path = os.path.join("path", "to", ".git", "internal", "file")
self.assertTrue(self.dvc.scm.belongs_to_scm(path))
def test_belongs_to_scm_false(self):
path = os.path.join("some", "non-.git", "file")
self.assertFalse(self.dvc.scm.belongs_to_scm(path))