Did I find the right examples for you? yes no

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)

src/e/l/eliot-0.3.0/eliot/tests/test_output.py   eliot(Download)
        logger.write(message, serializer)
        self.assertEqual(len(written), 2)
        tracebackMessage = json.loads(written[0])
        assertContainsFields(self, tracebackMessage,
                             {'exception': 'exceptions.RuntimeError',
                              'message_type': 'eliot:traceback'})
        self.assertIn("RuntimeError: oops", tracebackMessage['traceback'])
        assertContainsFields(self, json.loads(written[1]),
        logger.write(self.badMessage)
 
        tracebackMessage = json.loads(written[0])
        expected = {
            'exception': expected,
            "message_type": "eliot:serialization_failure",
            "message": logger._safeUnicodeDictionary(self.badMessage)}
        serializationMessage = json.loads(written[1])
        assertContainsFields(self, serializationMessage, expected)