summaryrefslogtreecommitdiff
path: root/tests/09_test_write_tree.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2012-01-10 13:17:10 +0100
committerGuido Günther <agx@sigxcpu.org>2012-01-10 13:23:28 +0100
commit3ad38b7ba4d52ee36339a1dab608c8ff8c2ec96c (patch)
treec2b2c16768ec25e1d4b9e7dc88c48ffb0b190894 /tests/09_test_write_tree.py
parent8328c326f1fd40ecf9d6404faaee8658ec37f201 (diff)
downloadgit-buildpackage-3ad38b7ba4d52ee36339a1dab608c8ff8c2ec96c.tar.gz
git-buildpackage-3ad38b7ba4d52ee36339a1dab608c8ff8c2ec96c.tar.bz2
git-buildpackage-3ad38b7ba4d52ee36339a1dab608c8ff8c2ec96c.zip
Use testutils in 09_test_write_tree.py
Diffstat (limited to 'tests/09_test_write_tree.py')
-rw-r--r--tests/09_test_write_tree.py19
1 files changed, 3 insertions, 16 deletions
diff --git a/tests/09_test_write_tree.py b/tests/09_test_write_tree.py
index c642ed60..d721ce69 100644
--- a/tests/09_test_write_tree.py
+++ b/tests/09_test_write_tree.py
@@ -3,16 +3,15 @@
"""Test L{GitRepository}'s write_tree method"""
import os
-import shutil
-import tempfile
-import unittest
+
+import testutils
import gbp.log
import gbp.git
import gbp.errors
-class TestWriteTree(unittest.TestCase):
+class TestWriteTree(testutils.DebianGitTestRepo):
def _write_testtree(self):
"""Write a test tree"""
paths = []
@@ -23,18 +22,6 @@ class TestWriteTree(unittest.TestCase):
paths.append(path)
return paths
- def setUp(self):
- gbp.log.setup(False, False)
- top = os.path.abspath(os.path.curdir)
- self.tmpdir = os.path.join(top, 'gbp_%s_repo' % __name__)
- os.mkdir(self.tmpdir)
-
- repodir = os.path.join(self.tmpdir, 'test_repo')
- self.repo = gbp.git.GitRepository.create(repodir)
-
- def tearDown(self):
- shutil.rmtree(self.tmpdir)
-
def test_write_tree_index_nonexistant(self):
"""Write out index file to nonexistant dir"""
paths = self._write_testtree()