[ros-vcstools] 02/02: Add fake identity for VCSs (#123)
Jochen Sprickerhof
jspricke at moszumanska.debian.org
Fri Jul 28 05:36:59 UTC 2017
This is an automated email from the git hooks/post-receive script.
jspricke pushed a commit to branch patch-queue/master
in repository ros-vcstools.
commit 7fe63767de29bb94adb5616e17a81eaab4a5255b
Author: Jochen Sprickerhof <github at jochen.sprickerhof.de>
Date: Fri Jul 28 01:02:00 2017 +0200
Add fake identity for VCSs (#123)
* Add fake identity for VCSs
This makes the unit tests self contained.
* add author and committer for git
---
test/test_bzr.py | 8 +++-----
test/test_git.py | 5 +++++
test/test_hg.py | 3 +++
3 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/test/test_bzr.py b/test/test_bzr.py
index 8e260c3..93c5952 100644
--- a/test/test_bzr.py
+++ b/test/test_bzr.py
@@ -44,15 +44,13 @@ import unittest
from vcstools.bzr import BzrClient, _get_bzr_version
+os.environ['EMAIL'] = 'Your Name <name at example.com>'
+
+
class BzrClientTestSetups(unittest.TestCase):
@classmethod
def setUpClass(self):
- try:
- subprocess.check_call(["bzr", "whoami"])
- except subprocess.CalledProcessError:
- subprocess.check_call(["bzr", "whoami", '"ros ros at ros.org"'])
-
self.root_directory = tempfile.mkdtemp()
self.directories = dict(setUp=self.root_directory)
self.remote_path = os.path.join(self.root_directory, "remote")
diff --git a/test/test_git.py b/test/test_git.py
index cbee034..bb62d0e 100644
--- a/test/test_git.py
+++ b/test/test_git.py
@@ -52,6 +52,11 @@ try:
except ImportError:
from SocketServer import TCPServer, BaseRequestHandler
+os.environ['GIT_AUTHOR_NAME'] = 'Your Name'
+os.environ['GIT_COMMITTER_NAME'] = 'Your Name'
+os.environ['GIT_AUTHOR_EMAIL'] = 'name at example.com'
+os.environ['EMAIL'] = 'Your Name <name at example.com>'
+
class GitClientTestSetups(unittest.TestCase):
diff --git a/test/test_hg.py b/test/test_hg.py
index f45a7c6..7812625 100644
--- a/test/test_hg.py
+++ b/test/test_hg.py
@@ -43,6 +43,9 @@ import shutil
from vcstools.hg import HgClient
+os.environ['EMAIL'] = 'Your Name <name at example.com>'
+
+
class HGClientTestSetups(unittest.TestCase):
@classmethod
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ros/ros-vcstools.git
More information about the debian-science-commits
mailing list