call site 16 for path.local.__str__
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 46
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/conftesthandle.py - line 27
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
   def setinitial(self, args):
       """ return a Conftest object initialized with a path obtained
               from looking at the first (usually cmdline) argument that points
               to an existing file object. 
               XXX note: conftest files may add command line options
               and we thus have no completely safe way of determining
               which parts of the arguments are actually related to options. 
           """
       current = py.path.local()
       for arg in args + [current]:
->         anchor = current.join(arg, abs=1)
           if anchor.check(): # we found some file object 
               #print >>py.std.sys.stderr, "initializing conftest from", anchor
               # conftest-lookups without a path actually mean 
               # lookups with our initial path. 
               self._path2confmods[None] = self.getconftestmodules(anchor)
               #print " -> ", conftest._path2confmods
               break
path/local/local.py - line 175
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