'Output from Python code writing to ``sys.stdout`` and ``sys.stderr``
is captured and turned into Eliot log messages.'

def test_stdout_stderr(self):

    d = self.run_script(StdoutStderrScript)
    def got_messages(messages):
        assertContainsFields(self, messages[1], {u'message_type': u'twisted:log', u'message': u'stdout!', u'error': False})
        assertContainsFields(self, messages[2], {u'message_type': u'twisted:log', u'message': u'stderr!', u'error': True})
    d.addCallback(got_messages)
    return d
