diff options
Diffstat (limited to 'tests/addons/test_git.py')
-rw-r--r-- | tests/addons/test_git.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/addons/test_git.py b/tests/addons/test_git.py index b896304d..596a2b34 100644 --- a/tests/addons/test_git.py +++ b/tests/addons/test_git.py @@ -12,6 +12,7 @@ from pkgcore.ebuild.atom import MalformedAtom from pkgcore.ebuild.atom import atom as atom_cls from pkgcore.restrictions import packages from snakeoil.cli.exceptions import UserException +from snakeoil.contexts import os_environ from snakeoil.fileutils import touch from snakeoil.osutils import pjoin from snakeoil.process import CommandNotFound, find_binary @@ -466,6 +467,9 @@ class TestGitAddon: self.addon = git.GitAddon(options) self.cache_file = self.addon.cache_file(self.repo) + with os_environ(XDG_CONFIG_HOME=self.cache_dir): + yield + def test_git_unavailable(self, tool): args = ["scan", "--cache-dir", self.cache_dir, "--repo", self.repo.location] options, _ = tool.parse_args(args) |