Make it more clear that :messages helps with failing processes
This commit is contained in:
parent
cb4aea2f69
commit
ed2f473a8e
@ -106,8 +106,8 @@ class GUIProcess(QObject):
|
|||||||
assert status == QProcess.NormalExit
|
assert status == QProcess.NormalExit
|
||||||
# We call this 'status' here as it makes more sense to the user -
|
# We call this 'status' here as it makes more sense to the user -
|
||||||
# it's actually 'code'.
|
# it's actually 'code'.
|
||||||
message.error("{} exited with status {}.".format(
|
message.error("{} exited with status {}, see :messages for "
|
||||||
self._what.capitalize(), code))
|
"details.".format(self._what.capitalize(), code))
|
||||||
|
|
||||||
stderr = bytes(self._proc.readAllStandardError()).decode('utf-8')
|
stderr = bytes(self._proc.readAllStandardError()).decode('utf-8')
|
||||||
stdout = bytes(self._proc.readAllStandardOutput()).decode('utf-8')
|
stdout = bytes(self._proc.readAllStandardOutput()).decode('utf-8')
|
||||||
|
@ -195,7 +195,8 @@ def test_exit_unsuccessful(qtbot, proc, message_mock, py_proc, caplog):
|
|||||||
proc.start(*py_proc('import sys; sys.exit(1)'))
|
proc.start(*py_proc('import sys; sys.exit(1)'))
|
||||||
|
|
||||||
msg = message_mock.getmsg(usertypes.MessageLevel.error)
|
msg = message_mock.getmsg(usertypes.MessageLevel.error)
|
||||||
assert msg.text == "Testprocess exited with status 1."
|
expected = "Testprocess exited with status 1, see :messages for details."
|
||||||
|
assert msg.text == expected
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('stream', ['stdout', 'stderr'])
|
@pytest.mark.parametrize('stream', ['stdout', 'stderr'])
|
||||||
|
Loading…
Reference in New Issue
Block a user