mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-02 11:16:41 +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"
|
assert False, "Should get a failure"
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# XXX but how to tell if we failed for the right reason?
|
# depending on the full output being in the error-message
|
||||||
# (should get UploadUnhappinessError)
|
# here; see util.py
|
||||||
print("failure expected: {}".format(e))
|
assert 'UploadUnhappinessError' in str(e)
|
||||||
|
print("found expected UploadUnhappinessError")
|
||||||
|
@ -53,7 +53,13 @@ class _CollectOutputProtocol(ProcessProtocol):
|
|||||||
|
|
||||||
def processExited(self, reason):
|
def processExited(self, reason):
|
||||||
if not isinstance(reason.value, ProcessDone):
|
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):
|
def outReceived(self, data):
|
||||||
self.output.write(data)
|
self.output.write(data)
|
||||||
|
Loading…
Reference in New Issue
Block a user