mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-30 09:48:56 +00:00
tweak tests/error output
This commit is contained in:
parent
7f195c9c9a
commit
3c679e9202
@ -166,6 +166,7 @@ def test_reject_storage_server(reactor, request, alice, storage_nodes):
|
||||
)
|
||||
assert False, "Should get a failure"
|
||||
except Exception as e:
|
||||
# XXX but how to tell if we failed for the right reason?
|
||||
# (should get UploadUnhappinessError)
|
||||
print("failure expected: {}".format(e))
|
||||
# depending on the full output being in the error-message
|
||||
# here; see util.py
|
||||
assert 'UploadUnhappinessError' in str(e)
|
||||
print("found expected UploadUnhappinessError")
|
||||
|
@ -53,7 +53,13 @@ class _CollectOutputProtocol(ProcessProtocol):
|
||||
|
||||
def processExited(self, reason):
|
||||
if not isinstance(reason.value, ProcessDone):
|
||||
self.done.errback(reason)
|
||||
#self.done.errback(reason)
|
||||
self.done.errback(RuntimeError(
|
||||
"Process failed: {}\nOutput:\n{}".format(
|
||||
reason,
|
||||
self.output.getvalue(),
|
||||
)
|
||||
))
|
||||
|
||||
def outReceived(self, data):
|
||||
self.output.write(data)
|
||||
|
Loading…
Reference in New Issue
Block a user