Mercurial > hgsubversion
changeset 873:c58213aaf7c8
test_svnwrap: use test_util.rmtree() (or fix it)
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Fri, 20 Apr 2012 18:07:42 +0200 |
parents | a279b5838aaf |
children | f2de043ac924 |
files | tests/test_svnwrap.py |
diffstat | 1 files changed, 1 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test_svnwrap.py +++ b/tests/test_svnwrap.py @@ -3,21 +3,11 @@ import test_util import imp import os import subprocess -import shutil import tempfile import unittest from hgsubversion import svnwrap -import os -import stat -def force_rm(path): - os.chmod( - path, - os.stat(path).st_mode | stat.S_IWUSR | stat.S_IWGRP | stat.S_IWOTH - ) - os.remove(path) - class TestBasicRepoLayout(unittest.TestCase): def setUp(self): self.tmpdir = tempfile.mkdtemp('svnwrap_test') @@ -35,8 +25,7 @@ class TestBasicRepoLayout(unittest.TestC def tearDown(self): del self.repo - shutil.rmtree(self.tmpdir, onerror=lambda func, path, e: force_rm(path)) - + test_util.rmtree(self.tmpdir) def test_num_revs(self): revs = list(self.repo.revisions())