call site 0 for code.Frame.__init__
doc/test_conftest.py - line 134
131
132
133
134
   def test_resolve_linkrole_check_api():
       from py.__.doc.conftest import resolve_linkrole
       assert resolve_linkrole('api', 'py.test.ensuretemp')
->     py.test.raises(AssertionError, "resolve_linkrole('api', 'py.foo.baz')")
test/raises.py - line 25
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
   def raises(ExpectedException, *args, **kwargs):
       """ raise AssertionError, if target code does not raise the expected
           exception.
       """
       assert args
       __tracebackhide__ = True 
       if isinstance(args[0], str):
           expr, = args
           assert isinstance(expr, str)
           frame = sys._getframe(1)
           loc = frame.f_locals.copy()
           loc.update(kwargs)
           #print "raises frame scope: %r" % frame.f_locals
           source = py.code.Source(expr)
           try:
               exec source.compile() in frame.f_globals, loc
               #del __traceback__
               # XXX didn'T mean f_globals == f_locals something special?
               #     this is destroyed here ...
           except ExpectedException:
->             return py.code.ExceptionInfo()
       else:
           func = args[0]
           assert callable
           try:
               func(*args[1:], **kwargs)
               #del __traceback__
           except ExpectedException:
               return py.code.ExceptionInfo()
           k = ", ".join(["%s=%r" % x for x in kwargs.items()])
           if k:
               k = ', ' + k
           expr = '%s(%r%s)' %(func.__name__, args, k)
       raise ExceptionFailure(msg="DID NOT RAISE", 
                              expr=args, expected=ExpectedException) 
code/excinfo.py - line 22
10
11
12
13
14
15
16
17
18
19
20
21
22
   def __init__(self, tup=None, exprinfo=None):
       # NB. all attributes are private!  Subclasses or other
       #     ExceptionInfo-like classes may have different attributes.
       if tup is None:
           tup = sys.exc_info()
           if exprinfo is None and isinstance(tup[1], py.magic.AssertionError):
               exprinfo = tup[1].msg
               if exprinfo and exprinfo.startswith('assert '):
                   self._striptext = 'AssertionError: '
       self._excinfo = tup
       self.type, self.value, tb = self._excinfo
       self.typename = self.type.__module__ + '.' + self.type.__name__
->     self.traceback = py.code.Traceback(tb) 
code/traceback2.py - line 113
106
107
108
109
110
111
112
113
114
115
   def __init__(self, tb):
       """ initialize from given python traceback object. """
       if hasattr(tb, 'tb_next'):
           def f(cur): 
               while cur is not None: 
                   yield self.Entry(cur)
                   cur = cur.tb_next 
->         list.__init__(self, f(tb)) 
       else:
           list.__init__(self, tb)
code/traceback2.py - line 111
109
110
111
112
   def f(cur): 
       while cur is not None: 
->         yield self.Entry(cur)
           cur = cur.tb_next 
code/traceback2.py - line 12
10
11
12
13
14
15
16
17
   def __init__(self, rawentry):
       self._rawentry = rawentry
->     self.frame = py.code.Frame(rawentry.tb_frame)
       # Ugh. 2.4 and 2.5 differs here when encountering
       # multi-line statements. Not sure about the solution, but
       # should be portable
       self.lineno = rawentry.tb_lineno - 1
       self.relline = self.lineno - self.frame.code.firstlineno