Oh right, Python 2 Eliot doesn't support custom JSON encoders.

This commit is contained in:
Itamar Turner-Trauring 2021-04-14 11:19:04 -04:00
parent 32607b5ada
commit d60bc2841a

View File

@ -73,7 +73,10 @@ RUN_TEST = ActionType(
# On Python 3, we want to use our custom JSON encoder when validating messages
# can be encoded to JSON:
_memory_logger = lambda: MemoryLogger(encoder=AnyBytesJSONEncoder)
if PY2:
_memory_logger = MemoryLogger
else:
_memory_logger = lambda: MemoryLogger(encoder=AnyBytesJSONEncoder)
@attr.s