Skip to content

Commit c36e247

Browse files
fix conflict in colors
1 parent 612a2d2 commit c36e247

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Lib/test/test_traceback.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
test_frame = namedtuple('frame', ['f_code', 'f_globals', 'f_locals'])
4141
test_tb = namedtuple('tb', ['tb_frame', 'tb_lineno', 'tb_next', 'tb_lasti'])
4242

43-
color_overrides = {"reset": "z", "filename": "fn", "error_highlight": "E", "note": "n"}
43+
color_overrides = {"reset": "z", "filename": "fn", "error_highlight": "E", "note": "n", "exception_target": "Y"}
4444
colors = {
4545
color_overrides.get(k, k[0].lower()): v
4646
for k, v in _colorize.default_theme.traceback.items()
@@ -5344,7 +5344,7 @@ def test_colorized_syntax_error(self):
53445344
e, capture_locals=True
53455345
)
53465346
actual = "".join(exc.format(colorize=True))
5347-
def expected(t, m, fn, l, f, E, e, z, n):
5347+
def expected(t, m, fn, l, f, E, e, z, n, Y):
53485348
return "".join(
53495349
[
53505350
f' File {fn}"<string>"{z}, line {l}1{z}\n',
@@ -5370,7 +5370,7 @@ def foo():
53705370
actual = tbstderr.getvalue().splitlines()
53715371

53725372
lno_foo = foo.__code__.co_firstlineno
5373-
def expected(t, m, fn, l, f, E, e, z, n):
5373+
def expected(t, m, fn, l, f, E, e, z, n, Y):
53745374
return [
53755375
'Traceback (most recent call last):',
53765376
f' File {fn}"{__file__}"{z}, '
@@ -5403,7 +5403,7 @@ def foo():
54035403

54045404
lno_foo = foo.__code__.co_firstlineno
54055405
actual = "".join(exc.format(colorize=True)).splitlines()
5406-
def expected(t, m, fn, l, f, E, e, z, n):
5406+
def expected(t, m, fn, l, f, E, e, z, n, Y):
54075407
return [
54085408
f" + Exception Group Traceback (most recent call last):",
54095409
f' | File {fn}"{__file__}"{z}, line {l}{lno_foo+9}{z}, in {f}test_colorized_traceback_from_exception_group{z}',

0 commit comments

Comments
 (0)