Rev 2706: Clean up test_status and test_update (Daniel Watkins) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Wed Aug 15 21:02:30 BST 2007
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 2706
revision-id: pqm at pqm.ubuntu.com-20070815200214-d3uyn1kkhzekttes
parent: pqm at pqm.ubuntu.com-20070815155635-7o7uhuh1ggjomeh4
parent: d.m.watkins at warwick.ac.uk-20070808020110-fu71o51rs7zal2yt
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2007-08-15 21:02:14 +0100
message:
Clean up test_status and test_update (Daniel Watkins)
modified:
bzrlib/tests/blackbox/test_status.py teststatus.py-20050712014354-508855eb9f29f7dc
bzrlib/tests/blackbox/test_update.py test_update.py-20060212125639-c4dad1a5c56d5919
------------------------------------------------------------
revno: 2664.7.2
merged: d.m.watkins at warwick.ac.uk-20070808020110-fu71o51rs7zal2yt
parent: d.m.watkins at warwick.ac.uk-20070808020007-lbjz6mx6ibz0ba4e
committer: Daniel Watkins <D.M.Watkins at warwick.ac.uk>
branch nick: fix-blackbox-tests
timestamp: Wed 2007-08-08 03:01:10 +0100
message:
tests.blackbox.test_update now uses internals where appropriate.
------------------------------------------------------------
revno: 2664.7.1
merged: d.m.watkins at warwick.ac.uk-20070808020007-lbjz6mx6ibz0ba4e
parent: pqm at pqm.ubuntu.com-20070731122244-f1jemfecukeevugw
committer: Daniel Watkins <D.M.Watkins at warwick.ac.uk>
branch nick: fix-blackbox-tests
timestamp: Wed 2007-08-08 03:00:07 +0100
message:
tests.blackbox.test_status now uses internals where appropriate.
=== modified file 'bzrlib/tests/blackbox/test_status.py'
--- a/bzrlib/tests/blackbox/test_status.py 2007-07-25 22:03:13 +0000
+++ b/bzrlib/tests/blackbox/test_status.py 2007-08-08 02:00:07 +0000
@@ -296,17 +296,17 @@
class TestStatus(TestCaseWithTransport):
def test_status_plain(self):
- self.run_bzr("init")
+ tree = self.make_branch_and_tree('.')
self.build_tree(['hello.txt'])
result = self.run_bzr("status")[0]
self.assertContainsRe(result, "unknown:\n hello.txt\n")
- self.run_bzr("add hello.txt")
+ tree.add("hello.txt")
result = self.run_bzr("status")[0]
self.assertContainsRe(result, "added:\n hello.txt\n")
- self.run_bzr("commit -m added")
+ tree.commit(message="added")
result = self.run_bzr("status -r 0..1")[0]
self.assertContainsRe(result, "added:\n hello.txt\n")
@@ -318,17 +318,17 @@
self.assertEquals(result2, result)
def test_status_short(self):
- self.run_bzr("init")
+ tree = self.make_branch_and_tree('.')
self.build_tree(['hello.txt'])
result = self.run_bzr("status --short")[0]
self.assertContainsRe(result, "[?] hello.txt\n")
- self.run_bzr("add hello.txt")
+ tree.add("hello.txt")
result = self.run_bzr("status --short")[0]
self.assertContainsRe(result, "[+]N hello.txt\n")
- self.run_bzr("commit -m added")
+ tree.commit(message="added")
result = self.run_bzr("status --short -r 0..1")[0]
self.assertContainsRe(result, "[+]N hello.txt\n")
@@ -340,17 +340,17 @@
self.assertEquals(result2, result)
def test_status_versioned(self):
- self.run_bzr("init")
+ tree = self.make_branch_and_tree('.')
self.build_tree(['hello.txt'])
result = self.run_bzr("status --versioned")[0]
self.assertNotContainsRe(result, "unknown:\n hello.txt\n")
- self.run_bzr("add hello.txt")
+ tree.add("hello.txt")
result = self.run_bzr("status --versioned")[0]
self.assertContainsRe(result, "added:\n hello.txt\n")
- self.run_bzr("commit -m added")
+ tree.commit("added")
result = self.run_bzr("status --versioned -r 0..1")[0]
self.assertContainsRe(result, "added:\n hello.txt\n")
=== modified file 'bzrlib/tests/blackbox/test_update.py'
--- a/bzrlib/tests/blackbox/test_update.py 2007-07-04 08:46:22 +0000
+++ b/bzrlib/tests/blackbox/test_update.py 2007-08-08 02:01:10 +0000
@@ -29,13 +29,13 @@
class TestUpdate(ExternalBase):
def test_update_standalone_trivial(self):
- self.run_bzr("init")
+ self.make_branch_and_tree('.')
out, err = self.run_bzr('update')
self.assertEqual('Tree is up to date at revision 0.\n', err)
self.assertEqual('', out)
def test_update_standalone_trivial_with_alias_up(self):
- self.run_bzr("init")
+ self.make_branch_and_tree('.')
out, err = self.run_bzr('up')
self.assertEqual('Tree is up to date at revision 0.\n', err)
self.assertEqual('', out)
More information about the bazaar-commits
mailing list