コード例 #1
0
ファイル: test_scm.py プロジェクト: yustoris/dvc
    def test(self):
        git = Git(self._root_dir)

        git.ignore('foo')
        self.assertTrue(os.path.isfile(Git.GITIGNORE))
        self.assertEqual(self._count_gitignore(), 1)

        git.ignore('foo')
        self.assertEqual(self._count_gitignore(), 1)

        git.ignore_remove('foo')
        self.assertEqual(self._count_gitignore(), 0)
コード例 #2
0
ファイル: test_scm.py プロジェクト: rpip/dvc
    def test_ignore(self):
        git = Git(self._root_dir)
        foo = os.path.join(self._root_dir, self.FOO)

        git.ignore(foo)
        self.assertTrue(os.path.isfile(Git.GITIGNORE))
        self.assertEqual(self._count_gitignore(), 1)

        git.ignore(foo)
        self.assertEqual(self._count_gitignore(), 1)

        git.ignore_remove(foo)
        self.assertEqual(self._count_gitignore(), 0)
コード例 #3
0
ファイル: test_scm.py プロジェクト: wegamekinglc/dvc
    def test_ignore(self, git, repo_dir):
        git = Git(repo_dir._root_dir)
        foo = os.path.join(repo_dir._root_dir, repo_dir.FOO)

        target = "/" + repo_dir.FOO

        git.ignore(foo)
        assert os.path.isfile(Git.GITIGNORE)
        assert self._count_gitignore_entries(target) == 1

        git.ignore(foo)
        assert os.path.isfile(Git.GITIGNORE)
        assert self._count_gitignore_entries(target) == 1

        git.ignore_remove(foo)
        assert self._count_gitignore_entries(target) == 0