Skip to content

Commit 9f015dd

Browse files
committed
Disable colors in the new test
The test compares the printed traceback with plain text. When colors are enabled, the traceback contains escape codes and the comparison fails. Use force_not_colorized to make the output plain.
1 parent e8f6087 commit 9f015dd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎Lib/test/test_sqlite3/test_hooks.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import sqlite3 as sqlite
2525
import unittest
2626

27-
from test.support import captured_stderr, import_helper
27+
from test.support import captured_stderr, force_not_colorized, import_helper
2828
from test.support.os_helper import TESTFN, unlink
2929

3030
from .util import memory_database, cx_limit, with_tracebacks
@@ -106,6 +106,7 @@ def mycoll(x, y):
106106
self.assertEqual(result, [('c',), ('b',), ('a',)],
107107
msg="the expected order was not returned")
108108

109+
@force_not_colorized
109110
def test_collation_error_then_step_failure_while_fetching(self):
110111
# gh-161837: A collation can set an exception. Then a later error can
111112
# make the same sqlite3_step() fail. The fetch must raise

0 commit comments

Comments
 (0)