Merge lp:~vila/bzr/osx-regressions into lp:~bzr/bzr/trunk-old

Proposed by John A Meinel on 2009-06-05
Status: Merged
Merged at revision: not available
Proposed branch: lp:~vila/bzr/osx-regressions
Merge into: lp:~bzr/bzr/trunk-old
Diff against target: 30 lines
To merge this branch: bzr merge lp:~vila/bzr/osx-regressions
Reviewer Review Type Date Requested Status
John A Meinel Approve on 2009-06-05
Review via email: mp+7100@code.launchpad.net

This proposal supersedes a proposal from 2009-06-05.

To post a comment you must log in.
Vincent Ladeuil (vila) wrote : Posted in a previous version of this proposal

This patch fixes some test failures revealed on OSX 10.5 with python 2.6.

It seems that OSX changed the way it creates temp directories and that they can
now contain funny characters (including %), that's for the note() fix.

It also seems that '+' can appear repeatedly in these paths, which revealed
the wrong order used for the assertNotContainsRe() call (well known trap :-/).

John A Meinel (jameinel) wrote :

Sorry about the 'Resubmit' but code-review generated the preview against an old version of bzr.dev, and I didn't want to have to re-review my patch again. Will review now.

John A Meinel (jameinel) wrote :

This seems like a little bit of a band-aid, though I suppose people won't intermix

 note('foo %s %%s' % one, two)

Certainly the recommended form has been note('foo %s %s', one, two)

Anyway, both are better than before.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzrlib/tests/__init__.py'
2--- bzrlib/tests/__init__.py 2009-06-05 07:14:08 +0000
3+++ bzrlib/tests/__init__.py 2009-06-05 14:35:11 +0000
4@@ -728,9 +728,11 @@
5 def finished(self):
6 """See progress.ProgressBar.finished()."""
7
8- def note(self, fmt_string, *args, **kwargs):
9+ def note(self, fmt_string, *args):
10 """See progress.ProgressBar.note()."""
11- self.stdout.write((fmt_string + "\n") % args)
12+ if args:
13+ fmt_string = fmt_string % args
14+ self.stdout.write(fmt_string + "\n")
15
16 def progress_bar(self):
17 return self
18
19=== modified file 'bzrlib/tests/test_plugins.py'
20--- bzrlib/tests/test_plugins.py 2009-03-24 01:53:42 +0000
21+++ bzrlib/tests/test_plugins.py 2009-06-05 14:35:11 +0000
22@@ -633,7 +633,7 @@
23 path = plugin.get_standard_plugins_path()
24 self.assertEqual(plugin.get_default_plugin_path(), path[0])
25 for directory in path:
26- self.assertNotContainsRe(r'\\/$', directory)
27+ self.assertNotContainsRe(directory, r'\\/$')
28 try:
29 from distutils.sysconfig import get_python_lib
30 except ImportError: