|
@@ -320,6 +320,8 @@ class RepositoryTests(TestCase):
|
|
|
self.assertIsInstance(r.get_config(), Config)
|
|
|
|
|
|
def test_get_config_stack(self):
|
|
|
+ self.addCleanup(os.environ.__setitem__, "HOME", os.environ["HOME"])
|
|
|
+ os.environ["HOME"] = "/nonexistant"
|
|
|
r = self._repo = open_repo('ooo_merge.git')
|
|
|
self.assertIsInstance(r.get_config_stack(), Config)
|
|
|
|
|
@@ -458,6 +460,8 @@ class BuildRepoTests(TestCase):
|
|
|
self.assertEquals("iso8859-1", r[commit_sha].encoding)
|
|
|
|
|
|
def test_commit_config_identity(self):
|
|
|
+ self.addCleanup(os.environ.__setitem__, "HOME", os.environ["HOME"])
|
|
|
+ os.environ["HOME"] = "/nonexistant"
|
|
|
# commit falls back to the users' identity if it wasn't specified
|
|
|
r = self._repo
|
|
|
c = r.get_config()
|