From 50c7b82af0b640cecf3b1b022c16703a442a016f Mon Sep 17 00:00:00 2001 From: Miro Hrončok Date: Mar 05 2018 21:03:08 +0000 Subject: Avoid calling /usr/bin/python in tests The call brought python2 dependency to tests Signed-off-by: Miro Hrončok --- diff --git a/tests/commands/test_add_tag.py b/tests/commands/test_add_tag.py index 49dce86..5950c21 100644 --- a/tests/commands/test_add_tag.py +++ b/tests/commands/test_add_tag.py @@ -1,4 +1,5 @@ import os +import sys from . import CommandTestCase @@ -35,9 +36,9 @@ class CommandAddTagTestCase(CommandTestCase): self.config_repo(cmd.path) # `git tag` will call $EDITOR to ask the user to write a message - os.environ['GIT_EDITOR'] = ('/usr/bin/python -c "import sys; ' + os.environ['GIT_EDITOR'] = ('%s -c "import sys; ' 'open(sys.argv[1], \'w\').write(\'%s\')"' - % message) + % (sys.executable, message)) cmd.add_tag(tag)