Rev 5012: Fix blackbox/test_infp.py imports. in file:///home/vila/src/bzr/cleanup/test-imports/

Vincent Ladeuil v.ladeuil+lp at free.fr
Fri Feb 5 13:29:25 GMT 2010


At file:///home/vila/src/bzr/cleanup/test-imports/

------------------------------------------------------------
revno: 5012
revision-id: v.ladeuil+lp at free.fr-20100205132925-cbn391q4ld595am3
parent: v.ladeuil+lp at free.fr-20100205132447-21r7m4uckakst1nr
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: test-imports
timestamp: Fri 2010-02-05 14:29:25 +0100
message:
  Fix blackbox/test_infp.py imports.
-------------- next part --------------
=== modified file 'bzrlib/tests/blackbox/test_info.py'
--- a/bzrlib/tests/blackbox/test_info.py	2010-01-20 23:28:35 +0000
+++ b/bzrlib/tests/blackbox/test_info.py	2010-02-05 13:29:25 +0000
@@ -25,22 +25,20 @@
     errors,
     info,
     osutils,
+    tests,
     upgrade,
     urlutils,
     )
-from bzrlib.osutils import format_date
-from bzrlib.tests import TestSkipped, MemoryServer
-from bzrlib.tests.blackbox import ExternalBase
-
-
-class TestInfo(ExternalBase):
+from bzrlib.transport import memory
+
+class TestInfo(tests.TestCaseWithTransport):
 
     def setUp(self):
-        ExternalBase.setUp(self)
+        super(TestInfo, self).setUp()
         self._repo_strings = "2a"
 
     def test_info_non_existing(self):
-        self.vfs_transport_factory = MemoryServer
+        self.vfs_transport_factory = memory.MemoryServer
         location = self.get_url()
         out, err = self.run_bzr('info '+location, retcode=3)
         self.assertEqual(out, '')
@@ -127,7 +125,7 @@
         self.assertEqual('', err)
         tree1.commit('commit one')
         rev = branch1.repository.get_revision(branch1.revision_history()[0])
-        datestring_first = format_date(rev.timestamp, rev.timezone)
+        datestring_first = osutils.format_date(rev.timestamp, rev.timezone)
 
         # Branch standalone with push location
         branch2 = branch1.bzrdir.sprout('branch').open_branch()
@@ -315,7 +313,7 @@
         tree1.add('b')
         tree1.commit('commit two')
         rev = branch1.repository.get_revision(branch1.revision_history()[-1])
-        datestring_last = format_date(rev.timestamp, rev.timezone)
+        datestring_last = osutils.format_date(rev.timestamp, rev.timezone)
 
         # Out of date branched standalone branch will not be detected
         out, err = self.run_bzr('info -v branch')
@@ -569,7 +567,7 @@
         tree2.add('a')
         tree2.commit('commit one')
         rev = repo.get_revision(branch2.revision_history()[0])
-        datestring_first = format_date(rev.timestamp, rev.timezone)
+        datestring_first = osutils.format_date(rev.timestamp, rev.timezone)
         out, err = self.run_bzr('info tree/lightcheckout --verbose')
         self.assertEqualDiff(
 """Lightweight checkout (format: %s)
@@ -688,7 +686,7 @@
 
         # Out of date lightweight checkout
         rev = repo.get_revision(branch1.revision_history()[-1])
-        datestring_last = format_date(rev.timestamp, rev.timezone)
+        datestring_last = osutils.format_date(rev.timestamp, rev.timezone)
         out, err = self.run_bzr('info tree/lightcheckout --verbose')
         self.assertEqualDiff(
 """Lightweight checkout (format: %s)
@@ -844,7 +842,7 @@
         tree1.add('a')
         tree1.commit('commit one')
         rev = repo.get_revision(branch1.revision_history()[0])
-        datestring_first = format_date(rev.timestamp, rev.timezone)
+        datestring_first = osutils.format_date(rev.timestamp, rev.timezone)
         out, err = self.run_bzr('info -v repo/branch1')
         self.assertEqualDiff(
 """Repository tree (format: knit)



More information about the bazaar-commits mailing list