Rev 5933: (mbp) test that socket.error doesn't give a traceback (Toon Nolten) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Sat May 28 00:53:13 UTC 2011
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 5933 [merge]
revision-id: pqm at pqm.ubuntu.com-20110528005310-y2p8pdhock5cund7
parent: pqm at pqm.ubuntu.com-20110527235731-gz1bly4xdi5y3zur
parent: toonn at skynet.be-20110527204601-t566c2tni0wgs0xr
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Sat 2011-05-28 00:53:10 +0000
message:
(mbp) test that socket.error doesn't give a traceback (Toon Nolten)
modified:
bzrlib/tests/test_trace.py testtrace.py-20051110225523-a21117fc7a07eeff
=== modified file 'bzrlib/tests/test_trace.py'
--- a/bzrlib/tests/test_trace.py 2011-04-07 11:23:09 +0000
+++ b/bzrlib/tests/test_trace.py 2011-05-27 20:46:01 +0000
@@ -128,6 +128,18 @@
# with errno, function name, and locale error message
self.assertContainsRe(msg,
r"^bzr: ERROR: \(2, 'RemoveDirectory[AW]?', .*\)")
+
+ def test_format_sockets_error(self):
+ try:
+ import socket
+ sock = socket.socket()
+ sock.send("This should fail.")
+ except socket.error:
+ pass
+ msg = _format_exception()
+
+ self.assertNotContainsRe(msg,
+ r"Traceback (most recent call last):")
def test_format_unicode_error(self):
try:
More information about the bazaar-commits
mailing list