call site 0 for test.collect.Function.listnames
test/testing/test_session.py - line 262
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
   def test_order_of_execution(self): 
       o = tmpdir.ensure('ordertest', dir=1)
       tfile = o.join('test_orderofexecution.py')
       tfile.write(py.code.Source("""
               l = []
               def test_1():
                   l.append(1)
               def test_2():
                   l.append(2)
               def test_3():
                   assert l == [1,2]
               class Testmygroup:
                   reslist = l
                   def test_1(self):
                       self.reslist.append(1)
                   def test_2(self):
                       self.reslist.append(2)
                   def test_3(self):
                       self.reslist.append(3)
                   def test_4(self):
                       assert self.reslist == [1,2,1,2,3]
           """))
   
       session = self.mainsession(o) 
       l = session.getitemoutcomepairs(Failed)
       assert len(l) == 0 
       l = session.getitemoutcomepairs(Passed)
       assert len(l) == 7 
       # also test listnames() here ... 
       item, result = l[-1]
       assert item.name == 'test_4' 
->     names = item.listnames()
       assert names == ['ordertest', 'test_orderofexecution.py', 'Testmygroup', '()', 'test_4']