From 35c304cd82f3e6f2d1ac6624645778c04106a853 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Tue, 3 Nov 2020 10:04:16 -0500 Subject: [PATCH] Workaround for Eliot flaw. --- src/allmydata/test/eliotutil.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/allmydata/test/eliotutil.py b/src/allmydata/test/eliotutil.py index 9c12629f9..0c72502a7 100644 --- a/src/allmydata/test/eliotutil.py +++ b/src/allmydata/test/eliotutil.py @@ -6,6 +6,7 @@ Tools aimed at the interaction between tests and Eliot. # Can't use `builtins.str` because it's not JSON encodable: # `exceptions.TypeError: is not JSON-encodeable` from past.builtins import unicode as str +from future.utils import PY3 __all__ = [ "RUN_TEST", @@ -164,6 +165,9 @@ class EliotLoggedRunTest(object): @eliot_logged_test def run(self, result=None): + # Workaround for https://github.com/itamarst/eliot/issues/456 + if PY3: + self.case.eliot_logger._validate_message = lambda *args, **kwargs: None return self._run_tests_with_factory( self.case, self.handlers,