call site 4 for path.local.common
test/testing/test_config.py - line 346
344
345
346
347
348
349
350
351
352
353
354
   def test_getcolitems_curdir_and_subdir(self):
       a = self.tmpdir.ensure("a", dir=1)
->     config = py.test.config._reparse([self.tmpdir, a])
       colitems = config.getcolitems()
       assert len(colitems) == 2
       col1, col2 = colitems 
       assert col1.name == self.tmpdir.basename
       assert col2.name == 'a'
       for col in colitems:
           for subcol in col.listchain():
               assert col._config is config 
test/config.py - line 187
180
181
182
183
184
185
186
187
188
189
190
   def _reparse(self, args):
       """ this is used from tests that want to re-invoke parse(). """
       #assert args # XXX should not be empty
       global config_per_process
       oldconfig = py.test.config
       try:
           config_per_process = py.test.config = Config()
->         config_per_process.parse(args) 
           return config_per_process
       finally: 
           config_per_process = py.test.config = oldconfig 
test/config.py - line 52
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
   def parse(self, args): 
       """ parse cmdline arguments into this config object. 
               Note that this can only be called once per testing process. 
           """ 
       assert not self._initialized, (
               "can only parse cmdline args once per Config object")
       self._initialized = True
       adddefaultoptions(self)
       self._conftest.setinitial(args) 
       args = [str(x) for x in args]
       cmdlineoption, args = self._parser.parse_args(args) 
       self.option.__dict__.update(vars(cmdlineoption))
       if not args:
           args.append(py.std.os.getcwd())
->     self.topdir = gettopdir(args)
       self.args = args 
test/config.py - line 297
291
292
293
294
295
296
297
298
299
300
301
302
303
   def gettopdir(args): 
       """ return the top directory for the given paths.
           if the common base dir resides in a python package 
           parent directory of the root package is returned. 
       """
       args = [py.path.local(arg) for arg in args]
->     p = reduce(py.path.local.common, args)
       assert p, "cannot determine common basedir of %s" %(args,)
       pkgdir = p.pypkgpath()
       if pkgdir is None:
           return p
       else:
           return pkgdir.dirpath()