Rev 2243: Merge new subvertpy. in http://people.samba.org/bzr/jelmer/bzr-svn/0.5
Jelmer Vernooij
jelmer at samba.org
Mon Dec 8 17:06:38 GMT 2008
At http://people.samba.org/bzr/jelmer/bzr-svn/0.5
------------------------------------------------------------
revno: 2243
revision-id: jelmer at samba.org-20081208170635-t9v37nm57ivn9yd6
parent: jelmer at samba.org-20081208164007-3nivx8ux3yz58qsf
parent: jelmer at samba.org-20081208170047-92folkm4kvrxxrsn
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.5
timestamp: Mon 2008-12-08 18:06:35 +0100
message:
Merge new subvertpy.
modified:
subvertpy/subvertpy/tests/__init__.py __init__.py-20081002194117-jwf9payoee8eqz7g-1
subvertpy/subvertpy/tests/test_repos.py test_repos.py-20080603030558-86ewiakm2z5y9x29-1
------------------------------------------------------------
revno: 1925.2.43
revision-id: jelmer at samba.org-20081208170047-92folkm4kvrxxrsn
parent: jelmer at samba.org-20081208164940-16mfy5x6ki3updao
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Mon 2008-12-08 18:00:47 +0100
message:
Use own TestCaseInTempDir.
modified:
subvertpy/tests/__init__.py __init__.py-20081002194117-jwf9payoee8eqz7g-1
------------------------------------------------------------
revno: 1925.2.42
revision-id: jelmer at samba.org-20081208164940-16mfy5x6ki3updao
parent: jelmer at samba.org-20081208163916-wu9wvev7y3vjb771
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Mon 2008-12-08 17:49:40 +0100
message:
Avoid using bzrlib.
modified:
subvertpy/tests/test_repos.py test_repos.py-20080603030558-86ewiakm2z5y9x29-1
=== modified file 'subvertpy/subvertpy/tests/__init__.py'
--- a/subvertpy/subvertpy/tests/__init__.py 2008-12-08 16:38:34 +0000
+++ b/subvertpy/subvertpy/tests/__init__.py 2008-12-08 17:00:47 +0000
@@ -20,15 +20,44 @@
import urllib, urllib2, urlparse
-# FIXME: Remove dependency on bzrlib
-from bzrlib.tests import TestCaseInTempDir
-
-import os, sys
+import os
+import shutil
+import sys
+import tempfile
+from unittest import TestCase
from subvertpy import delta, ra, repos, delta, client, properties
from subvertpy.ra import Auth, RemoteAccess
+class TestCaseInTempDir(TestCase):
+
+ def setUp(self):
+ TestCase.setUp(self)
+ self._oldcwd = os.getcwd()
+ self.test_dir = tempfile.mkdtemp()
+ os.chdir(self.test_dir)
+
+ def tearDown(self):
+ TestCase.tearDown(self)
+ os.chdir(self._oldcwd)
+ shutil.rmtree(self.test_dir)
+
+ def assertIsInstance(self, obj, kls):
+ """Fail if obj is not an instance of kls"""
+ if not isinstance(obj, kls):
+ self.fail("%r is an instance of %s rather than %s" % (
+ obj, obj.__class__, kls))
+
+ def assertIs(self, left, right, message=None):
+ if not (left is right):
+ if message is not None:
+ raise AssertionError(message)
+ else:
+ raise AssertionError("%r is not %r." % (left, right))
+
+
+
class TestFileEditor(object):
def __init__(self, file):
self.file = file
=== modified file 'subvertpy/subvertpy/tests/test_repos.py'
--- a/subvertpy/subvertpy/tests/test_repos.py 2008-10-02 21:16:21 +0000
+++ b/subvertpy/subvertpy/tests/test_repos.py 2008-12-08 16:49:40 +0000
@@ -17,7 +17,7 @@
import os
from subvertpy import repos
-from bzrlib.tests import TestCaseInTempDir
+from subvertpy.tests import TestCaseInTempDir
class TestClient(TestCaseInTempDir):
def setUp(self):
More information about the bazaar-commits
mailing list