[Python-modules-commits] [dulwich] 03/19: fix variable name in hook test
Jelmer Vernooij
jelmer at moszumanska.debian.org
Sun Oct 29 17:22:26 UTC 2017
This is an automated email from the git hooks/post-receive script.
jelmer pushed a commit to branch master
in repository dulwich.
commit 6d40c57543ad1082611b50f2ef1c49a0fbd1d2b6
Author: Fabian Grünbichler <fabian.gruenbichler at student.tuwien.ac.at>
Date: Sun Oct 1 20:10:49 2017 +0200
fix variable name in hook test
---
dulwich/tests/test_hooks.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dulwich/tests/test_hooks.py b/dulwich/tests/test_hooks.py
index 5715e40..cc3be8f 100644
--- a/dulwich/tests/test_hooks.py
+++ b/dulwich/tests/test_hooks.py
@@ -125,10 +125,10 @@ if [ "$(pwd)" = '""" + repo_dir + "' ]; then exit 0; else exit 1; fi\n"
os.mkdir(os.path.join(repo_dir, 'hooks'))
self.addCleanup(shutil.rmtree, repo_dir)
- post_commit_msg = """#!/bin/sh
+ post_commit_success = """#!/bin/sh
rm """ + path + "\n"
- post_commit_msg_fail = """#!/bin/sh
+ post_commit_fail = """#!/bin/sh
exit 1
"""
@@ -139,7 +139,7 @@ if [ "$(pwd)" = '""" + repo_dir + "' ]; then exit 0; else exit 1; fi\n"
hook = PostCommitShellHook(repo_dir)
with open(post_commit, 'w') as f:
- f.write(post_commit_msg_fail)
+ f.write(post_commit_fail)
os.chmod(post_commit, stat.S_IREAD | stat.S_IWRITE | stat.S_IEXEC)
self.assertRaises(errors.HookError, hook.execute)
@@ -151,7 +151,7 @@ if [ "$(pwd)" = '""" + repo_dir + "' ]; then exit 0; else exit 1; fi\n"
hook.execute()
with open(post_commit, 'w') as f:
- f.write(post_commit_msg)
+ f.write(post_commit_success)
os.chmod(post_commit, stat.S_IREAD | stat.S_IWRITE | stat.S_IEXEC)
hook.execute()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/dulwich.git
More information about the Python-modules-commits
mailing list