33import os
44import subprocess
55from fnmatch import fnmatchcase
6- from io import StringIO
6+ try :
7+ from StringIO import StringIO
8+ except ImportError :
9+ from io import StringIO
710try :
811 from itertools import izip_longest
912except ImportError :
@@ -50,8 +53,8 @@ def test_pth_sample2():
5053 stderr = subprocess .STDOUT ,
5154 )
5255 for line , expected in izip_longest (output .decode ('utf8' ).splitlines (), [
53- '* tests/sample2.py:* call if __name__ == "__main__":' ,
54- '* tests/sample2.py:* line if __name__ == "__main__":' ,
56+ '* tests/sample2.py:* call if __name__ == "__main__": #* ' ,
57+ '* tests/sample2.py:* line if __name__ == "__main__": #* ' ,
5558 '* tests/sample2.py:* line import functools' ,
5659 '* tests/sample2.py:* line def deco(opt):' ,
5760 '* tests/sample2.py:* line @deco(1)' ,
@@ -88,7 +91,7 @@ def test_pth_sample2():
8891 '* tests/sample2.py:* return return wrapper' ,
8992 '* * ... return value: <function foo *' ,
9093 '* tests/sample2.py:* line foo(' ,
91- "* tests/sample2.py:* line 'a'," ,
94+ "* tests/sample2.py:* line 'a* '," ,
9295 "* tests/sample2.py:* line 'b'" ,
9396 '* tests/sample2.py:* call @functools.wraps(func)' ,
9497 '* * | def wrapper(*args):' ,
@@ -105,13 +108,13 @@ def test_pth_sample2():
105108 '* * | def foo(*args):' ,
106109 '* tests/sample2.py:* line return args' ,
107110 '* tests/sample2.py:* return return args' ,
108- "* * ... return value: ('a', 'b')" ,
111+ "* * ... return value: ('a* ', 'b')" ,
109112 "* tests/sample2.py:* return return func(*args)" ,
110- "* * ... return value: ('a', 'b')" ,
113+ "* * ... return value: ('a* ', 'b')" ,
111114 "* tests/sample2.py:* return return func(*args)" ,
112- "* * ... return value: ('a', 'b')" ,
115+ "* * ... return value: ('a* ', 'b')" ,
113116 "* tests/sample2.py:* return return func(*args)" ,
114- "* * ... return value: ('a', 'b')" ,
117+ "* * ... return value: ('a* ', 'b')" ,
115118 "* tests/sample2.py:* line try:" ,
116119 "* tests/sample2.py:* line None(" ,
117120 "* tests/sample2.py:* line 'a'," ,
0 commit comments