Mercurial > hgsubversion
diff tests/test_svnwrap.py @ 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 | 312b37bc5e20 |
children | f2de043ac924 |
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())