mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-01 23:08:43 +01:00
18 lines
585 B
Python
18 lines
585 B
Python
import os
|
|
|
|
from tests.basic_env import TestDvc
|
|
|
|
|
|
class TestGit(TestDvc):
|
|
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))
|