← 返回首页
fix test for early 2.7 · bpython/bpython@ebeffd7 · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Commit ebeffd7

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

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎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)

Footer

© 2026 GitHub, Inc.