blob: c70a5b1de521ccb80f761b2a6b5646fccbb80d36 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
From 46bc5ab843d9f83d8fa6869ba04de7adc4320dfb Mon Sep 17 00:00:00 2001
From: Carl Smedstad <carl.smedstad@protonmail.com>
Date: Tue, 4 Jan 2022 14:02:04 +0100
Subject: [PATCH] Unset EDITOR env var in test_run_hook_edit
Without this the test will fail if the EDITOR env var is set to
something different than 'vim -n'.
---
gitlint-core/gitlint/tests/cli/test_cli_hooks.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gitlint-core/gitlint/tests/cli/test_cli_hooks.py b/gitlint-core/gitlint/tests/cli/test_cli_hooks.py
index 825345f..6cb03de 100644
--- a/gitlint-core/gitlint/tests/cli/test_cli_hooks.py
+++ b/gitlint-core/gitlint/tests/cli/test_cli_hooks.py
@@ -132,6 +132,8 @@ class CLIHookTests(BaseTestCase):
for i in range(0, len(set_editors)):
if set_editors[i]:
os.environ['EDITOR'] = set_editors[i]
+ else:
+ os.environ.pop('EDITOR', None)
with self.patch_input(['e', 'e', 'n']):
with self.tempdir() as tmpdir:
--
2.34.1
|