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

Proposed by Martin Packman
Status: Merged
Approved by: Vincent Ladeuil
Approved revision: no longer in the source branch.
Merged at revision: 5563
Proposed branch: lp:~gz/bzr/trivial_mac_non_utf8_filename
Merge into: lp:bzr
Diff against target: 12 lines (+2/-0)
1 file modified
bzrlib/tests/test_osutils.py (+2/-0)
To merge this branch: bzr merge lp:~gz/bzr/trivial_mac_non_utf8_filename
Reviewer Review Type Date Requested Status
Vincent Ladeuil Approve
Review via email: mp+42981@code.launchpad.net

Commit message

Skip test for bug 488519 on OS X

Description of the change

The test for bug 488519 relies old-school unix filesystem behaviour of being able to shove any bytes you like into a filename. By default, OS X will percent-mangle any filenames that don't fit its unicode world-view, but won't throw exceptions.

This branch adds a check to see if the filename renamed to is actually exists should avoid having to worry about complex platform/filesystem interactions. If more tests run into this issue later, we could add a feature.

To post a comment you must log in.
Revision history for this message
Vincent Ladeuil (vila) wrote :

Great, that should make *all* tests pass on OSX 10.5 !

Kudos to mgz for making one more platform turn blue on babune :)

review: Approve
Revision history for this message
Vincent Ladeuil (vila) wrote :

sent to pqm by email

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzrlib/tests/test_osutils.py'
2--- bzrlib/tests/test_osutils.py 2010-12-02 10:41:05 +0000
3+++ bzrlib/tests/test_osutils.py 2010-12-07 17:52:37 +0000
4@@ -1107,6 +1107,8 @@
5
6 # rename the 1file to a latin-1 filename
7 os.rename("./1file", "\xe8file")
8+ if "\xe8file" not in os.listdir("."):
9+ self.skip("Lack filesystem that preserves arbitrary bytes")
10
11 self._save_platform_info()
12 win32utils.winver = None # Avoid the win32 detection code