call site 1 for path.local.__add__
path/local/testing/test_local.py - line 204
196
197
198
199
200
201
202
203
204
205
206
207
208
209
   def test_sysfind_no_permisson(self):
       dir = py.test.ensuretemp('sysfind') 
       env = py.std.os.environ
       oldpath = env['PATH']
       try:
           noperm = dir.ensure('noperm', dir=True)
           env['PATH'] += ":%s" % (noperm)
           noperm.chmod(0)
->         assert py.path.local.sysfind('a') is None
               
       finally:
           env['PATH'] = oldpath
           noperm.chmod(0644)
           noperm.remove()
path/local/local.py - line 536
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
   def sysfind(cls, name, checker=None):
       """ return a path object found by looking at the systems
               underlying PATH specification. If the checker is not None
               it will be invoked to filter matching paths.  If a binary
               cannot be found, None is returned
               Note: This is probably not working on plain win32 systems
               but may work on cygwin.
           """
       if os.path.isabs(name):
           p = py.path.local(name)
           if p.check(file=1):
               return p
       else:
           if py.std.sys.platform == 'win32':
               paths = py.std.os.environ['Path'].split(';')
               try:
                   systemroot = os.environ['SYSTEMROOT']
               except KeyError:
                   pass
               else:
                   paths = [re.sub('%SystemRoot%', systemroot, path)
                            for path in paths]
               tryadd = '', '.exe', '.com', '.bat' # XXX add more?
           else:
               paths = py.std.os.environ['PATH'].split(':')
               tryadd = ('',)
   
           for x in paths:
               for addext in tryadd:
->                 p = py.path.local(x).join(name, abs=True) + addext
                   try:
                       if p.check(file=1):
                           if checker:
                               if not checker(p):
                                   continue
                           return p
                   except py.error.EACCES:
                       pass
       return None