lp:~gagern/bzr/encodingSafeTests
If some test output causes trouble due to mismatches between unicode strings, byte strings, and locale settings, then it would be nice to recover from these errors, printing as much information as feasible under the curcumstances.
This originally happened for me while dealing with local date formats, day of week in particular, while I've been working on my (now abandoned) lp:~gagern/bzr/setlocale branch and the bug #128496 it's related to. But in general I assume this kind of fix might be useful for anyone dealing with tests for complicated encoding issues.
See http://
- Get this branch:
- bzr branch lp:~gagern/bzr/encodingSafeTests
Branch merges
- Martin Packman (community): Abstain
- Andrew Bennetts: Needs Fixing
-
Diff: 142 lines (+79/-11)2 files modifiedbzrlib/tests/__init__.py (+29/-11)
bzrlib/tests/test_selftest.py (+50/-0)
Branch information
Recent revisions
- 3530. By Martin von Gagern
-
Fix broken newline unescaping.
In order to show useful diffs, and readable output in general, newlines
should not be escaped. The unescaping done before was broken if r'\n'
appeared in the input, as Andrew Bennetts reviewed. In order to avoid using
regular expressions, we now split lines and join them after escaping. Added
a test case as well, and a new test class for toplevel functions in tests. - 3529. By Martin von Gagern
-
Merge from trunk, with lots of adjustments.
This branch has been lying around for quite a while, so there has been a
number of changes to incorporate. Therefore this merge has a large edit
component to it. - 3527. By Martin von Gagern
-
More robust handling of encoding issues in tests.
Problems with encoding errors could lead to not only single tests
failing but the whole selftest process crashing. The introduction of
safe strings as a fallback in case of trouble avoids most of these
problems. The safe strings try to maintain as much information as
possible while using only ASCII characters. This is achieved by
formatting the strings using escape sequences.This modification only changes how certain test results are displayed
to the user. There is no change to the semantics of these tests, so a
test that used to fail before will still continue to fail. Hopefully if
it does fail it is more likely that the test suite will continue with
the next test and not abort due to some exception displaying the error. - 3526. By Canonical.com Patch Queue Manager <email address hidden>
-
(Jelmer) Remove specialized has_revisions() implementation since it
breaks stacking. - 3525. By Canonical.com Patch Queue Manager <email address hidden>
-
(robertc) Add -Dmemory for quick memory gathering. (Robert Collins)
- 3524. By Canonical.com Patch Queue Manager <email address hidden>
-
(robertc) More tracing for trace+ transport. (Robert Collins)
- 3523. By Canonical.com Patch Queue Manager <email address hidden>
-
Fix error when raising InvalidRevisionId. (Andrew Bennetts)
- 3522. By Canonical.com Patch Queue Manager <email address hidden>
-
Reinstate InterRemoteToOther. (Andrew Bennetts)
- 3521. By Canonical.com Patch Queue Manager <email address hidden>
-
Fix check to understand split up .bzr format (Daniel Mark Watkins)
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:bzr