Skip to content

Commit 44549b9

Browse files
committed
fix this test
1 parent 327648f commit 44549b9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Lib/test/test_pyrepl/test_fancycompleter.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import unittest
22
import sys
33

4+
from _colorize import ANSIColors
45
import _pyrepl.readline
56
from _pyrepl.fancycompleter import Completer, DefaultConfig, commonprefix
67

@@ -70,8 +71,8 @@ def test_complete_attribute_colored(self):
7071
matches = compl.attr_matches('a.__')
7172
self.assertGreater(len(matches), 2)
7273
expected_color = compl.config.color_by_type.get(type(compl.__class__))
73-
self.assertEqual(expected_color, '35;01')
74-
expected_part = Color.set(expected_color, '__class__')
74+
self.assertEqual(expected_color, ANSIColors.BOLD_MAGENTA)
75+
expected_part = f'{expected_color}__class__{ANSIColors.RESET}'
7576
for match in matches:
7677
if expected_part in match:
7778
break

0 commit comments

Comments
 (0)