Merge lp://qastaging/~mbp/bzr/test-errors into lp://qastaging/bzr
Status: | Work in progress |
---|---|
Proposed branch: | lp://qastaging/~mbp/bzr/test-errors |
Merge into: | lp://qastaging/bzr |
Diff against target: |
554 lines (+176/-116) 4 files modified
bzrlib/osutils.py (+10/-0) bzrlib/tests/__init__.py (+121/-61) bzrlib/tests/test_selftest.py (+36/-46) bzrlib/tests/test_trace.py (+9/-9) |
To merge this branch: | bzr merge lp://qastaging/~mbp/bzr/test-errors |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Pool | Approve | ||
Martin Packman (community) | Needs Information | ||
John A Meinel | Approve | ||
Review via email: mp+64485@code.qastaging.launchpad.net |
Commit message
multiple selftest improvements: print errors once; no traceback for xfail; no empty logs (bug 499713, bug 625597)
Description of the change
A few selftest annoyances fixed:
* Errors are printed only once, as they occur, not again at the end.
If someone actually really likes this, the code is there and you can
add a configuration to turn it on. (See bug 408192, bug 625597, though
this is not exactly what was discussed.)
* UnicodeOrBytesT
printing the repr of the wrapped object.
* The indentation of test failures did not fit well with testtools' behavior
of returning the whole traceback as part of the error string.
* We shouldn't print the whole traceback for known failures. Just
the reason string is enough. (Bug 499713)
* To let the unicode-escaping code work, we need to pass it the error
as a unicode string.
* Don't attach empty log files; as a consequence the log is not attached
until the test completes. (However, it can still be read from
TestCase.
* Bugs in old subunits do not deserve a 'known failure' in bzr. Only
things we could fix (without time travel) should get that.
Unmerged revisions
- 5979. By Martin Pool
-
merge trunk
- 5978. By Martin Pool
-
Update test_mutter_
never_fails to have more precise assertions and cope with getting non-ascii back - 5977. By Martin Pool
-
Resolve conflicts
- 5976. By Martin Pool
-
Remove intentionally broken test
- 5975. By Martin Pool
-
Bugs in old subunits aren't bzr bugs
- 5974. By Martin Pool
-
Don't print traceback for xfail messages
- 5973. By Martin Pool
-
Unify code to report selftest failures
- 5972. By Martin Pool
-
Avoid excess indenting; handle unicode failures better in selftest -v
- 5971. By Martin Pool
-
Don't attach the log to the testtools object until the end when we know there are actual contents
- 5970. By Martin Pool
-
Send test output streams through the ui stream mechanism.
This gives them the default stream encoding, and should avoid clashing with progress bars.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 6/14/2011 5:51 AM, Martin Pool wrote: /code.launchpad .net/~mbp/ bzr/test- errors/ +merge/ 64485 oBytesWriter had the somewhat confusing behavior of
> Martin Pool has proposed merging lp:~mbp/bzr/test-errors into lp:bzr.
>
> Requested reviews:
> bzr-core (bzr-core)
>
> For more details, see:
> https:/
>
> A few selftest annoyances fixed:
>
> * Errors are printed only once, as they occur, not again at the end.
> If someone actually really likes this, the code is there and you can
> add a configuration to turn it on. (See bug 408192, bug 625597, though
> this is not exactly what was discussed.)
>
> * UnicodeOrBytesT
> printing the repr of the wrapped object.
>
> * The indentation of test failures did not fit well with testtools' behavior
> of returning the whole traceback as part of the error string.
>
> * We shouldn't print the whole traceback for known failures. Just
> the reason string is enough. (Bug 499713)
Yay!
> get_log( )).
> * To let the unicode-escaping code work, we need to pass it the error
> as a unicode string.
>
> * Don't attach empty log files; as a consequence the log is not attached
> until the test completes. (However, it can still be read from
> TestCase.
This also seems nice.
>
> * Bugs in old subunits do not deserve a 'known failure' in bzr. Only
> things we could fix (without time travel) should get that.
"We know this fails under these conditions", that seems like known
failure to me. However, I guess it could just be skipped.
Anyway, the code all looks good to me.
merge: approve
John enigmail. mozdev. org/
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAk3 3eXgACgkQJdeBCY SNAAMXzgCaAik/ 3rhrICt85tsgBYV f584Z xGIQYtT2GU85REi kDc
hGUAoNC7d66TJ+
=hh8p
-----END PGP SIGNATURE-----