Merge lp:~gz/bzr/trivial_conflicts_tests_need_feature into lp:bzr

Proposed by Martin Packman
Status: Merged
Approved by: Martin Packman
Approved revision: no longer in the source branch.
Merged at revision: 5909
Proposed branch: lp:~gz/bzr/trivial_conflicts_tests_need_feature
Merge into: lp:bzr
Diff against target: 20 lines (+2/-1)
1 file modified
bzrlib/tests/blackbox/test_conflicts.py (+2/-1)
To merge this branch: bzr merge lp:~gz/bzr/trivial_conflicts_tests_need_feature
Reviewer Review Type Date Requested Status
Jelmer Vernooij (community) Approve
Review via email: mp+61891@code.launchpad.net

Commit message

Require UnicodeFilenameFeature for new tests in bb.test_conflicts

Description of the change

Fixes another an oversight from <lp:~gz/bzr/conflicts_non_ascii_ui_686161> by requiring unicode filenames to be supported to run the new tests in bb.test_conflicts so they'll be skipped on systems without a locale set.

Confusingly, the Feature I needed wasn't in bzrlib.tests.features and appears to be duplicated as both UnicodeFilenameFeature and UnicodeFilename.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

On Sun, 2011-05-22 at 12:01 +0000, Martin [gz] wrote:
> Confusingly, the Feature I needed wasn't in bzrlib.tests.features and appears to be duplicated as both UnicodeFilenameFeature and UnicodeFilename.
Can you file a bug about that?

 review approve

> differences between files attachment (review-diff.txt)
> === modified file 'bzrlib/tests/blackbox/test_conflicts.py'
> --- bzrlib/tests/blackbox/test_conflicts.py 2011-05-21 16:29:38 +0000
> +++ bzrlib/tests/blackbox/test_conflicts.py 2011-05-22 12:01:44 +0000
> @@ -19,7 +19,7 @@
> tests,
> workingtree,
> )
> -from bzrlib.tests import script
> +from bzrlib.tests import script, UnicodeFilenameFeature

We're usually writing these imports on several lines now, to make
merging less problematic. I guess it's not really a big deal in this
case.

Cheers,

Jelmer

review: Approve
Revision history for this message
Martin Packman (gz) wrote :

> Can you file a bug about that?

Filed bug 786537 and will probably tackle it later today.

> We're usually writing these imports on several lines now, to make
> merging less problematic. I guess it's not really a big deal in this
> case.

Yep, and had I not looked in the wrong place first could have not touched the import and just used tests.UnicodeFilenameFeature instead. I'll need to change this line anyway to import the features module shortly.

Revision history for this message
Martin Packman (gz) wrote :

sent to pqm by email

Revision history for this message
Andrew Bennetts (spiv) wrote :

Jelmer Vernooij wrote:
[…]
> > -from bzrlib.tests import script
> > +from bzrlib.tests import script, UnicodeFilenameFeature
>
> We're usually writing these imports on several lines now, to make
> merging less problematic. I guess it's not really a big deal in this
> case.

It'd be neat if someone wrote a per-file merger that could handle
merging import lines of a .py file…

-Andrew

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzrlib/tests/blackbox/test_conflicts.py'
2--- bzrlib/tests/blackbox/test_conflicts.py 2011-05-21 16:29:38 +0000
3+++ bzrlib/tests/blackbox/test_conflicts.py 2011-05-22 12:01:44 +0000
4@@ -19,7 +19,7 @@
5 tests,
6 workingtree,
7 )
8-from bzrlib.tests import script
9+from bzrlib.tests import script, UnicodeFilenameFeature
10
11
12 def make_tree_with_conflicts(test, this_path='this', other_path='other',
13@@ -86,6 +86,7 @@
14 class TestUnicodePaths(tests.TestCaseWithTransport):
15 """Unicode characters in conflicts should be displayed properly"""
16
17+ _test_needs_features = [UnicodeFilenameFeature]
18 encoding = "UTF-8"
19
20 def _as_output(self, text):