call site 2 for test.collect.Directory.listchain
test/testing/test_config.py - line 405
402
403
404
405
406
407
408
409
410
411
412
413
414
   def test_get_collector_trail_topdir_and_beyond(self):
       config = py.test.config._reparse([self.tmpdir])
       col = config._getcollector(config.topdir)
->     trail = config.get_collector_trail(col)
       assert len(trail) == 2
       assert trail[0] == '.'
       assert trail[1] == ()
       col2 = config._getcollector(trail)
       assert col2.fspath == config.topdir
       assert len(col2.listchain()) == 1
       col3 = config._getcollector(config.topdir.dirpath())
       py.test.raises(ValueError, 
             "config.get_collector_trail(col3)")
test/config.py - line 243
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
   def get_collector_trail(self, collector):
       """ provide a trail relative to the topdir, 
               which can be used to reconstruct the
               collector (possibly on a different host
               starting from a different topdir). 
           """ 
->     chain = collector.listchain()
       relpath = chain[0].fspath.relto(self.topdir)
       if not relpath:
           if chain[0].fspath == self.topdir:
               relpath = "."
           else:
               raise ValueError("%r not relative to %s" 
                        %(chain[0], self.topdir))
       return relpath, tuple([x.name for x in chain[1:]])