Rev 4417: Small tweaks to to the tests for --tree support. in http://bazaar.launchpad.net/~jameinel/bzr/tree_opt

John Arbash Meinel john at arbash-meinel.com
Fri Jun 5 14:20:57 BST 2009


At http://bazaar.launchpad.net/~jameinel/bzr/tree_opt

------------------------------------------------------------
revno: 4417
revision-id: john at arbash-meinel.com-20090605132035-n0zufqegqxp9kqxa
parent: fullermd at over-yonder.net-20090605082806-fi2sxktk053i9hox
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: tree_opt
timestamp: Fri 2009-06-05 08:20:35 -0500
message:
  Small tweaks to to the tests for --tree support.
-------------- next part --------------
=== modified file 'bzrlib/tests/blackbox/test_revision_info.py'
--- a/bzrlib/tests/blackbox/test_revision_info.py	2009-06-05 02:39:18 +0000
+++ b/bzrlib/tests/blackbox/test_revision_info.py	2009-06-05 13:20:35 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2005 Canonical Ltd
+# Copyright (C) 2004, 2005, 2009 Canonical Ltd
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -93,7 +93,7 @@
         wt.commit('Commit one', rev_id='a at r-0-1')
 
         # Make checkout and move the branch forward
-        self.run_bzr('checkout --lightweight branch checkout')
+        wt.branch.create_checkout('checkout', lightweight=True)
         wt.commit('Commit two', rev_id='a at r-0-2')
 
         # Make sure the checkout gives the right answer for branch and

=== modified file 'bzrlib/tests/blackbox/test_revno.py'
--- a/bzrlib/tests/blackbox/test_revno.py	2009-06-05 02:13:32 +0000
+++ b/bzrlib/tests/blackbox/test_revno.py	2009-06-05 13:20:35 +0000
@@ -22,9 +22,9 @@
 import os
 
 from bzrlib.branch import Branch
-from bzrlib.tests import TestCaseInTempDir
+from bzrlib.tests import TestCaseWithTransport
 
-class TestRevno(TestCaseInTempDir):
+class TestRevno(TestCaseWithTransport):
 
     def test_revno(self):
 
@@ -52,14 +52,13 @@
 
     def test_revno_tree(self):
         # Make branch and checkout
-        os.mkdir('branch')
-        self.run_bzr('init branch')
-        self.run_bzr('checkout --lightweight branch checkout')
+        wt = self.make_branch_and_tree('branch')
+        checkout = wt.branch.create_checkout('checkout', lightweight=True)
 
         # Get the checkout out of date
         self.build_tree(['branch/file'])
-        self.run_bzr('add branch/file')
-        self.run_bzr('commit -m mkfile branch')
+        wt.add(['file'])
+        wt.commit('mkfile')
 
         # Make sure revno says we're on 1
         out,err = self.run_bzr('revno checkout')



More information about the bazaar-commits mailing list