1
# Copyright (C) 2006, 2007 Canonical Ltd
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; either version 2 of the License, or
6
# (at your option) any later version.
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
# GNU General Public License for more details.
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
"""The basic test suite for bzr-git."""
26
TestCase = tests.TestCase
27
TestCaseInTempDir = tests.TestCaseInTempDir
28
TestCaseWithTransport = tests.TestCaseWithTransport
31
class _GitCommandFeature(tests.Feature):
35
p = subprocess.Popen(['git', '--version'], stdout=subprocess.PIPE)
38
out, err = p.communicate()
39
trace.mutter('Using: %s', out.rstrip('\n'))
42
def feature_name(self):
45
GitCommandFeature = _GitCommandFeature()
49
cmd = ['git'] + list(args)
50
p = subprocess.Popen(cmd,
51
stdout=subprocess.PIPE,
52
stderr=subprocess.PIPE)
53
out, err = p.communicate()
55
raise AssertionError('Bad return code: %d for %s:\n%s'
56
% (p.returncode, ' '.join(cmd), err))
61
loader = tests.TestLoader()
63
suite = tests.TestSuite()
68
'test_git_repository',
72
testmod_names = ['%s.%s' % (__name__, t) for t in testmod_names]
73
suite.addTests(loader.loadTestsFromModuleNames(testmod_names))