call site 1 for path.local.new
doc/test_conftest.py - line 10
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
path/common.py - line 317
313
314
315
316
317
   def dirpath(self, *args, **kwargs):
       """ return the directory Path of the current Path joined
               with any given path arguments.
           """
->     return self.new(basename='').join(*args, **kwargs)
path/local/local.py - line 192
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
   def join(self, *args, **kwargs):
       """ return a new path by appending all 'args' as path
           components.  if abs=1 is used restart from root if any
           of the args is an absolute path.
           """
       if not args:
           return self
       strpath = self.strpath
       sep = self.sep
       strargs = [str(x) for x in args]
       if kwargs.get('abs', 0):
           for i in range(len(strargs)-1, -1, -1):
               if os.path.isabs(strargs[i]):
                   strpath = strargs[i]
                   strargs = strargs[i+1:]
                   break
       for arg in strargs:
           arg = arg.strip(sep)
           if py.std.sys.platform == 'win32':
               # allow unix style paths even on windows.
               arg = arg.strip('/')
               arg = arg.replace('/', sep)
           if arg:
               if not strpath.endswith(sep):
                   strpath += sep
               strpath += arg
->     obj = self.new()
       obj.strpath = os.path.normpath(strpath)
       return obj