~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

merge bzr.dev and tweaks to lower threads

Show diffs side-by-side

added added

removed removed

Lines of Context:
861
861
            return
862
862
        if message is None:
863
863
            message = "texts not equal:\n"
 
864
        if a == b + '\n':
 
865
            message = 'first string is missing a final newline.\n'
 
866
        if a + '\n' == b:
 
867
            message = 'second string is missing a final newline.\n'
864
868
        raise AssertionError(message +
865
869
                             self._ndiff_strings(a, b))
866
870
        
2744
2748
                   'bzrlib.tests.test_registry',
2745
2749
                   'bzrlib.tests.test_remote',
2746
2750
                   'bzrlib.tests.test_repository',
2747
 
                   'bzrlib.tests.repository_external_reference_implementations',
 
2751
                   'bzrlib.tests.per_repository_reference',
2748
2752
                   'bzrlib.tests.test_revert',
2749
2753
                   'bzrlib.tests.test_revision',
2750
2754
                   'bzrlib.tests.test_revisionspec',
3059
3063
OsFifoFeature = _OsFifoFeature()
3060
3064
 
3061
3065
 
 
3066
class _UnicodeFilenameFeature(Feature):
 
3067
    """Does the filesystem support Unicode filenames?"""
 
3068
 
 
3069
    def _probe(self):
 
3070
        try:
 
3071
            os.stat(u'\u03b1')
 
3072
        except UnicodeEncodeError:
 
3073
            return False
 
3074
        except (IOError, OSError):
 
3075
            # The filesystem allows the Unicode filename but the file doesn't
 
3076
            # exist.
 
3077
            return True
 
3078
        else:
 
3079
            # The filesystem allows the Unicode filename and the file exists,
 
3080
            # for some reason.
 
3081
            return True
 
3082
 
 
3083
UnicodeFilenameFeature = _UnicodeFilenameFeature()
 
3084
 
 
3085
 
3062
3086
class TestScenarioApplier(object):
3063
3087
    """A tool to apply scenarios to tests."""
3064
3088