Rev 6271: (gz) Avoid stringifying FileExists in test_transform which need not care in file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/%2Btrunk/
Patch Queue Manager
pqm at pqm.ubuntu.com
Thu Nov 17 14:46:43 UTC 2011
At file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 6271 [merge]
revision-id: pqm at pqm.ubuntu.com-20111117144642-ftfb38t0hbnxoysq
parent: pqm at pqm.ubuntu.com-20111117133239-0yk0ttnj6jto3a04
parent: martin.packman at canonical.com-20111117134853-7vx07j7vtqzfjwhh
committer: Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2011-11-17 14:46:42 +0000
message:
(gz) Avoid stringifying FileExists in test_transform which need not care
about message localisation (Martin Packman)
modified:
bzrlib/tests/test_transform.py test_transaction.py-20060105172520-b3ffb3946550e6c4
doc/en/release-notes/bzr-2.5.txt bzr2.5.txt-20110708125756-587p0hpw7oke4h05-1
=== modified file 'bzrlib/tests/test_transform.py'
--- a/bzrlib/tests/test_transform.py 2011-07-21 06:46:34 +0000
+++ b/bzrlib/tests/test_transform.py 2011-11-17 13:45:49 +0000
@@ -1476,8 +1476,7 @@
# The rename will fail because the target directory is not empty (but
# raises FileExists anyway).
err = self.assertRaises(errors.FileExists, tt_helper)
- self.assertContainsRe(str(err),
- "^File exists: .+/baz")
+ self.assertEndsWith(err.path, "/baz")
def test_two_directories_clash(self):
def tt_helper():
@@ -1495,8 +1494,7 @@
wt.unlock()
raise
err = self.assertRaises(errors.FileExists, tt_helper)
- self.assertContainsRe(str(err),
- "^File exists: .+/foo")
+ self.assertEndsWith(err.path, "/foo")
def test_two_directories_clash_finalize(self):
def tt_helper():
@@ -1514,8 +1512,7 @@
tt.finalize()
raise
err = self.assertRaises(errors.FileExists, tt_helper)
- self.assertContainsRe(str(err),
- "^File exists: .+/foo")
+ self.assertEndsWith(err.path, "/foo")
def test_file_to_directory(self):
wt = self.make_branch_and_tree('.')
=== modified file 'doc/en/release-notes/bzr-2.5.txt'
--- a/doc/en/release-notes/bzr-2.5.txt 2011-11-17 13:06:58 +0000
+++ b/doc/en/release-notes/bzr-2.5.txt 2011-11-17 14:46:42 +0000
@@ -74,6 +74,8 @@
suite. This can include new facilities for writing tests, fixes to
spurious test failures and changes to the way things should be tested.
+* Avoid failures in test_transform when OS error messages are localised.
+ (Martin Packman, #891582)
bzr 2.5b3
#########
More information about the bazaar-commits
mailing list