call site 7 for path.local.check
doc/test_conftest.py - line 17
8
9
10
11
12
13
14
15
16
17
18
19
20
21
   def test_doctest_extra_exec(): 
       # XXX get rid of the next line: 
       py.magic.autopath().dirpath('conftest.py').copy(tmpdir.join('conftest.py'))
       xtxt = tmpdir.join('y.txt')
       xtxt.write(py.code.Source("""
           hello::
               .. >>> raise ValueError 
                  >>> None
       """))
->     config = py.test.config._reparse([xtxt]) 
       session = config.initsession()
       session.main()
       l = session.getitemoutcomepairs(Failed) 
       assert len(l) == 1
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 299
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()
path/local/local.py - line 367
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
   def pypkgpath(self, pkgname=None):
       """ return the path's package path by looking for the given
               pkgname.  If pkgname is None then look for the last
               directory upwards which still contains an __init__.py.
               Return None if a pkgpath can not be determined.
           """
       pkgpath = None
       for parent in self.parts(reverse=True):
           if pkgname is None:
               if parent.check(file=1):
                   continue
->             if parent.join('__init__.py').check():
                   pkgpath = parent
                   continue
               return pkgpath
           else:
               if parent.basename == pkgname:
                   return parent
       return pkgpath