@@ -79,78 +79,78 @@ def test_pth_sample2():
7979 stderr = subprocess .STDOUT ,
8080 )
8181 for line , expected in izip_longest (output .decode ('utf-8' ).splitlines (), [
82- '* tests*sample2.py:* call if __name__ == "__main__": #*' ,
83- '* tests*sample2.py:* line if __name__ == "__main__": #*' ,
84- '* tests*sample2.py:* line import functools' ,
85- '* tests*sample2.py:* line def deco(opt):' ,
86- '* tests*sample2.py:* line @deco(1)' ,
87- '* tests*sample2.py:* call def deco(opt):' ,
88- '* tests*sample2.py:* line def decorator(func):' ,
89- '* tests*sample2.py:* line return decorator' ,
90- '* tests*sample2.py:* return return decorator' ,
91- '* * ... return value: <function deco*' ,
92- '* tests*sample2.py:* line @deco(2)' ,
93- '* tests*sample2.py:* call def deco(opt):' ,
94- '* tests*sample2.py:* line def decorator(func):' ,
95- '* tests*sample2.py:* line return decorator' ,
96- '* tests*sample2.py:* return return decorator' ,
97- '* * ... return value: <function deco*' ,
98- '* tests*sample2.py:* line @deco(3)' ,
99- '* tests*sample2.py:* call def deco(opt):' ,
100- '* tests*sample2.py:* line def decorator(func):' ,
101- '* tests*sample2.py:* line return decorator' ,
102- '* tests*sample2.py:* return return decorator' ,
103- '* * ... return value: <function deco*' ,
104- '* tests*sample2.py:* call def decorator(func):' ,
105- '* tests*sample2.py:* line @functools.wraps(func)' ,
106- '* tests*sample2.py:* line return wrapper' ,
107- '* tests*sample2.py:* return return wrapper' ,
108- '* * ... return value: <function foo *' ,
109- '* tests*sample2.py:* call def decorator(func):' ,
110- '* tests*sample2.py:* line @functools.wraps(func)' ,
111- '* tests*sample2.py:* line return wrapper' ,
112- '* tests*sample2.py:* return return wrapper' ,
113- '* * ... return value: <function foo *' ,
114- '* tests*sample2.py:* call def decorator(func):' ,
115- '* tests*sample2.py:* line @functools.wraps(func)' ,
116- '* tests*sample2.py:* line return wrapper' ,
117- '* tests*sample2.py:* return return wrapper' ,
118- '* * ... return value: <function foo *' ,
119- '* tests*sample2.py:* line foo(' ,
120- "* tests*sample2.py:* line 'a*'," ,
121- "* tests*sample2.py:* line 'b'" ,
122- '* tests*sample2.py:* call @functools.wraps(func)' ,
123- '* * | def wrapper(*args):' ,
124- '* tests*sample2.py:* line return func(*args)' ,
125- '* tests*sample2.py:* call @functools.wraps(func)' ,
126- '* * | def wrapper(*args):' ,
127- '* tests*sample2.py:* line return func(*args)' ,
128- '* tests*sample2.py:* call @functools.wraps(func)' ,
129- '* * | def wrapper(*args):' ,
130- '* tests*sample2.py:* line return func(*args)' ,
131- '* tests*sample2.py:* call @deco(1)' ,
132- '* * | @deco(2)' ,
133- '* * | @deco(3)' ,
134- '* * | def foo(*args):' ,
135- '* tests*sample2.py:* line return args' ,
136- '* tests*sample2.py:* return return args' ,
137- "* * ... return value: ('a*', 'b')" ,
138- "* tests*sample2.py:* return return func(*args)" ,
139- "* * ... return value: ('a*', 'b')" ,
140- "* tests*sample2.py:* return return func(*args)" ,
141- "* * ... return value: ('a*', 'b')" ,
142- "* tests*sample2.py:* return return func(*args)" ,
143- "* * ... return value: ('a*', 'b')" ,
144- "* tests*sample2.py:* line try:" ,
145- "* tests*sample2.py:* line None(" ,
146- "* tests*sample2.py:* line 'a'," ,
147- "* tests*sample2.py:* line 'b'" ,
148- "* tests*sample2.py:* exception 'b'" ,
149- "* * ... exception value: *" ,
150- "* tests*sample2.py:* line except:" ,
151- "* tests*sample2.py:* line pass" ,
152- "* tests*sample2.py:* return pass" ,
153- "* ... return value: None" ,
82+ '*tests*sample2.py:* call if __name__ == "__main__": #*' ,
83+ '*tests*sample2.py:* line if __name__ == "__main__": #*' ,
84+ '*tests*sample2.py:* line import functools' ,
85+ '*tests*sample2.py:* line def deco(opt):' ,
86+ '*tests*sample2.py:* line @deco(1)' ,
87+ '*tests*sample2.py:* call def deco(opt):' ,
88+ '*tests*sample2.py:* line def decorator(func):' ,
89+ '*tests*sample2.py:* line return decorator' ,
90+ '*tests*sample2.py:* return return decorator' ,
91+ '* * ... return value: <function deco*' ,
92+ '*tests*sample2.py:* line @deco(2)' ,
93+ '*tests*sample2.py:* call def deco(opt):' ,
94+ '*tests*sample2.py:* line def decorator(func):' ,
95+ '*tests*sample2.py:* line return decorator' ,
96+ '*tests*sample2.py:* return return decorator' ,
97+ '* * ... return value: <function deco*' ,
98+ '*tests*sample2.py:* line @deco(3)' ,
99+ '*tests*sample2.py:* call def deco(opt):' ,
100+ '*tests*sample2.py:* line def decorator(func):' ,
101+ '*tests*sample2.py:* line return decorator' ,
102+ '*tests*sample2.py:* return return decorator' ,
103+ '* * ... return value: <function deco*' ,
104+ '*tests*sample2.py:* call def decorator(func):' ,
105+ '*tests*sample2.py:* line @functools.wraps(func)' ,
106+ '*tests*sample2.py:* line return wrapper' ,
107+ '*tests*sample2.py:* return return wrapper' ,
108+ '* * ... return value: <function foo *' ,
109+ '*tests*sample2.py:* call def decorator(func):' ,
110+ '*tests*sample2.py:* line @functools.wraps(func)' ,
111+ '*tests*sample2.py:* line return wrapper' ,
112+ '*tests*sample2.py:* return return wrapper' ,
113+ '* * ... return value: <function foo *' ,
114+ '*tests*sample2.py:* call def decorator(func):' ,
115+ '*tests*sample2.py:* line @functools.wraps(func)' ,
116+ '*tests*sample2.py:* line return wrapper' ,
117+ '*tests*sample2.py:* return return wrapper' ,
118+ '* * ... return value: <function foo *' ,
119+ '*tests*sample2.py:* line foo(' ,
120+ "*tests*sample2.py:* line 'a*'," ,
121+ "*tests*sample2.py:* line 'b'" ,
122+ '*tests*sample2.py:* call @functools.wraps(func)' ,
123+ '* * | def wrapper(*args):' ,
124+ '*tests*sample2.py:* line return func(*args)' ,
125+ '*tests*sample2.py:* call @functools.wraps(func)' ,
126+ '* * | def wrapper(*args):' ,
127+ '*tests*sample2.py:* line return func(*args)' ,
128+ '*tests*sample2.py:* call @functools.wraps(func)' ,
129+ '* * | def wrapper(*args):' ,
130+ '*tests*sample2.py:* line return func(*args)' ,
131+ '*tests*sample2.py:* call @deco(1)' ,
132+ '* * | @deco(2)' ,
133+ '* * | @deco(3)' ,
134+ '* * | def foo(*args):' ,
135+ '*tests*sample2.py:* line return args' ,
136+ '*tests*sample2.py:* return return args' ,
137+ "* * ... return value: ('a*', 'b')" ,
138+ "*tests*sample2.py:* return return func(*args)" ,
139+ "* * ... return value: ('a*', 'b')" ,
140+ "*tests*sample2.py:* return return func(*args)" ,
141+ "* * ... return value: ('a*', 'b')" ,
142+ "*tests*sample2.py:* return return func(*args)" ,
143+ "* * ... return value: ('a*', 'b')" ,
144+ "*tests*sample2.py:* line try:" ,
145+ "*tests*sample2.py:* line None(" ,
146+ "*tests*sample2.py:* line 'a'," ,
147+ "*tests*sample2.py:* line 'b'" ,
148+ "*tests*sample2.py:* exception 'b'" ,
149+ "* * ... exception value: *" ,
150+ "*tests*sample2.py:* line except:" ,
151+ "*tests*sample2.py:* line pass" ,
152+ "*tests*sample2.py:* return pass" ,
153+ "* ... return value: None" ,
154154 ], fillvalue = "MISSING" ):
155155 assert fnmatchcase (line , expected ), "%r didn't match %r" % (line , expected )
156156
@@ -195,18 +195,18 @@ def a():
195195 print (lines .getvalue ())
196196
197197 for line , expected in izip_longest (lines .getvalue ().splitlines (), [
198- "* * hunter.py* call def __enter__(self):" ,
199- "* * hunter.py* line return self" ,
200- "* * hunter.py* return return self" ,
201- "* * ... return value: <hunter.Tracer *" ,
202- "* * test_hunter.py* call def a():" ,
203- "* * test_hunter.py* line return 1" ,
204- "* * test_hunter.py* return return 1" ,
205- "* * ... return value: 1" ,
206- "* * hunter.py* call def __exit__(self, exc_type, exc_val, exc_tb):" ,
207- "* * hunter.py* line self.stop()" ,
208- "* * hunter.py* call def stop(self):" ,
209- "* * hunter.py* line sys.settrace(self._previous_tracer)" ,
198+ "*hunter.py* call def __enter__(self):" ,
199+ "*hunter.py* line return self" ,
200+ "*hunter.py* return return self" ,
201+ "* ... return value: <hunter.Tracer *" ,
202+ "*test_hunter.py* call def a():" ,
203+ "*test_hunter.py* line return 1" ,
204+ "*test_hunter.py* return return 1" ,
205+ "* ... return value: 1" ,
206+ "*hunter.py* call def __exit__(self, exc_type, exc_val, exc_tb):" ,
207+ "*hunter.py* line self.stop()" ,
208+ "*hunter.py* call def stop(self):" ,
209+ "*hunter.py* line sys.settrace(self._previous_tracer)" ,
210210 ], fillvalue = "MISSING" ):
211211 assert fnmatchcase (line , expected ), "%r didn't match %r" % (line , expected )
212212
@@ -233,36 +233,36 @@ def b():
233233 pass
234234 print (lines .getvalue ())
235235 for line , expected in izip_longest (lines .getvalue ().splitlines (), [
236- """* **** hunter.py:* call def __enter__(self):""" ,
237- """* **** hunter.py:* line return self""" ,
238- """* **** hunter.py:* return return self""" ,
239- """* * ... return value: <hunter.Tracer *""" ,
240- """* tests*test_hunter.py:* call class Bad(Exception):""" ,
241- """* tests*test_hunter.py:* line class Bad(Exception):""" ,
242- """* tests*test_hunter.py:* line def __repr__(self):""" ,
243- """* tests*test_hunter.py:* return def __repr__(self):""" ,
244- """* * ... return value: *""" ,
245- """* tests*test_hunter.py:* call def a():""" ,
246- """* tests*test_hunter.py:* line x = Bad()""" ,
247- """* tests*test_hunter.py:* line return x""" ,
248- """* * vars x => !!! FAILED REPR: RuntimeError("I'm a bad class!",)""" ,
249- """* tests*test_hunter.py:* return return x""" ,
250- """* * ... return value: !!! FAILED REPR: RuntimeError("I'm a bad class!",)""" ,
251- """* * vars x => !!! FAILED REPR: RuntimeError("I'm a bad class!",)""" ,
252- """* tests*test_hunter.py:* call def b():""" ,
253- """* tests*test_hunter.py:* line x = Bad()""" ,
254- """* tests*test_hunter.py:* line raise x""" ,
255- """* * vars x => !!! FAILED REPR: RuntimeError("I'm a bad class!",)""" ,
256- """* tests*test_hunter.py:* exception raise x""" ,
257- """* * ... exception value: !!! FAILED REPR: RuntimeError("I'm a bad class!",)""" ,
258- """* * vars x => !!! FAILED REPR: RuntimeError("I'm a bad class!",)""" ,
259- """* tests*test_hunter.py:* return raise x""" ,
260- """* * ... return value: None""" ,
261- """* * vars x => !!! FAILED REPR: RuntimeError("I'm a bad class!",)""" ,
262- """* **** hunter.py:* call def __exit__(self, exc_type, exc_val, exc_tb):""" ,
263- """* **** hunter.py:* line self.stop()""" ,
264- """* **** hunter.py:* call def stop(self):""" ,
265- """* **** hunter.py:* line sys.settrace(self._previous_tracer)""" ,
236+ """*hunter.py:* call def __enter__(self):""" ,
237+ """*hunter.py:* line return self""" ,
238+ """*hunter.py:* return return self""" ,
239+ """* ... return value: <hunter.Tracer *""" ,
240+ """*tests*test_hunter.py:* call class Bad(Exception):""" ,
241+ """*tests*test_hunter.py:* line class Bad(Exception):""" ,
242+ """*tests*test_hunter.py:* line def __repr__(self):""" ,
243+ """*tests*test_hunter.py:* return def __repr__(self):""" ,
244+ """* ... return value: *""" ,
245+ """*tests*test_hunter.py:* call def a():""" ,
246+ """*tests*test_hunter.py:* line x = Bad()""" ,
247+ """*tests*test_hunter.py:* line return x""" ,
248+ """* vars x => !!! FAILED REPR: RuntimeError("I'm a bad class!",)""" ,
249+ """*tests*test_hunter.py:* return return x""" ,
250+ """* ... return value: !!! FAILED REPR: RuntimeError("I'm a bad class!",)""" ,
251+ """* vars x => !!! FAILED REPR: RuntimeError("I'm a bad class!",)""" ,
252+ """*tests*test_hunter.py:* call def b():""" ,
253+ """*tests*test_hunter.py:* line x = Bad()""" ,
254+ """*tests*test_hunter.py:* line raise x""" ,
255+ """* vars x => !!! FAILED REPR: RuntimeError("I'm a bad class!",)""" ,
256+ """*tests*test_hunter.py:* exception raise x""" ,
257+ """* ... exception value: !!! FAILED REPR: RuntimeError("I'm a bad class!",)""" ,
258+ """* vars x => !!! FAILED REPR: RuntimeError("I'm a bad class!",)""" ,
259+ """*tests*test_hunter.py:* return raise x""" ,
260+ """* ... return value: None""" ,
261+ """* vars x => !!! FAILED REPR: RuntimeError("I'm a bad class!",)""" ,
262+ """*hunter.py:* call def __exit__(self, exc_type, exc_val, exc_tb):""" ,
263+ """*hunter.py:* line self.stop()""" ,
264+ """*hunter.py:* call def stop(self):""" ,
265+ """*hunter.py:* line sys.settrace(self._previous_tracer)""" ,
266266
267267 ], fillvalue = "MISSING" ):
268268 assert fnmatchcase (line , expected ), "%r didn't match %r" % (line , expected )
@@ -285,23 +285,23 @@ def a():
285285 print (lines .getvalue ())
286286
287287 for line , expected in izip_longest (lines .getvalue ().splitlines (), [
288- "* * hunter.py* call def __enter__(self):" ,
289- "* * hunter.py* line return self" ,
290- "* * hunter.py* return return self" ,
291- "* * ... return value: <hunter.Tracer *" ,
292- "* * test_hunter.py* call def a():" ,
293- "* * test_hunter.py* line b = 1" ,
294- "* * vars b => 1" ,
295- "* * test_hunter.py* line b = 2" ,
296- "* * vars b => 2" ,
297- "* * test_hunter.py* line return 1" ,
298- "* * vars b => 2" ,
299- "* * test_hunter.py* return return 1" ,
300- "* * ... return value: 1" ,
301- "* * hunter.py* call def __exit__(self, exc_type, exc_val, exc_tb):" ,
302- "* * hunter.py* line self.stop()" ,
303- "* * hunter.py* call def stop(self):" ,
304- "* * hunter.py* line sys.settrace(self._previous_tracer)" ,
288+ "*hunter.py* call def __enter__(self):" ,
289+ "*hunter.py* line return self" ,
290+ "*hunter.py* return return self" ,
291+ "* ... return value: <hunter.Tracer *" ,
292+ "*test_hunter.py* call def a():" ,
293+ "*test_hunter.py* line b = 1" ,
294+ "* vars b => 1" ,
295+ "*test_hunter.py* line b = 2" ,
296+ "* vars b => 2" ,
297+ "*test_hunter.py* line return 1" ,
298+ "* vars b => 2" ,
299+ "*test_hunter.py* return return 1" ,
300+ "* ... return value: 1" ,
301+ "*hunter.py* call def __exit__(self, exc_type, exc_val, exc_tb):" ,
302+ "*hunter.py* line self.stop()" ,
303+ "*hunter.py* call def stop(self):" ,
304+ "*hunter.py* line sys.settrace(self._previous_tracer)" ,
305305 ], fillvalue = "MISSING" ):
306306 assert fnmatchcase (line , expected ), "%r didn't match %r" % (line , expected )
307307
0 commit comments