From 0ab49cd244ed8e74628512e44e3e17831b6d80f3 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 29 Jul 2022 13:00:06 -0400 Subject: [PATCH] Disable `pygments` highlighting on ctlc tests --- tests/test_debugger.py | 7 +++++++ tractor/_debug.py | 1 + 2 files changed, 8 insertions(+) diff --git a/tests/test_debugger.py b/tests/test_debugger.py index 9d4515f..62e5fad 100644 --- a/tests/test_debugger.py +++ b/tests/test_debugger.py @@ -110,6 +110,13 @@ def ctlc(request) -> bool: # be 3.10+ mega-asap. pytest.skip('Py3.9 and `pdbpp` son no bueno..') + if use_ctlc: + # XXX: disable pygments highlighting for auto-tests + # since some envs (like actions CI) will struggle + # the the added color-char encoding.. + from tractor._debug import TractorConfig + TractorConfig.use_pygements = False + yield use_ctlc diff --git a/tractor/_debug.py b/tractor/_debug.py index c3a23be..065d387 100644 --- a/tractor/_debug.py +++ b/tractor/_debug.py @@ -85,6 +85,7 @@ _debugger_request_cs: Optional[trio.CancelScope] = None class TractorConfig(pdbpp.DefaultConfig): """Custom ``pdbpp`` goodness. """ + use_pygments = True # sticky_by_default = True enable_hidden_frames = False