Skip to content

Commit ebeffd7

Browse files
fix test for early 2.7
1 parent df29ae1 commit ebeffd7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

bpython/test/test_args.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# encoding: utf-8
22

3+
import re
34
import subprocess
45
import sys
56
import tempfile
@@ -66,7 +67,11 @@ def test_exec_nonascii_file_linenums(self):
6667
universal_newlines=True)
6768
(_, stderr) = p.communicate()
6869

69-
self.assertIn('line 3', stderr)
70+
self.assertIn('line 3', clean_colors(stderr))
71+
72+
73+
def clean_colors(s):
74+
return re.sub(r'\x1b[^m]*m', '', s)
7075

7176

7277
class TestParse(TestCase):

0 commit comments

Comments
 (0)