call site 3 for path.local.open
apigen/rest/testing/test_rest.py - line 292
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
   def test_check_section_order(self):
       # we use the previous method's data
       tempfile = temppath.join('internal_links.txt')
       if not tempfile.check():
           py.test.skip('depends on previous test, which failed')
->     data = _nl(tempfile.read())
       # index should be above the rest
       assert data.find('classes\\:') > -1
       assert data.find('classes\\:') < data.find('function\\: fun')
       assert data.find('classes\\:') < data.find(
                                                   'class\\: SomeClass')
       # function definitions should be above class ones
       assert data.find('function\\: fun') > data.find('class\\: SomeClass')
       # class method definitions should be below the class defs
       assert data.find('class\\: SomeClass') < data.find(
                                           'method\\: SomeClass.method')
       # __init__ should be above other methods
       assert data.find('method\\: SomeClass.\\_\\_init\\_\\_') > -1
       assert data.find('method\\: SomeClass.\\_\\_init\\_\\_') < data.find(
                                               'method\\: SomeClass.method')
       # base class info
       assert py.std.re.search(r'class\\\: SomeSubClass.*'
                               r'base classes\\\:\n\^+[\n ]+\* `SomeClass`_.*'
                               r'`SomeSubClass.__init__',
                               data, py.std.re.S)
path/common.py - line 335
329
330
331
332
333
334
335
336
337
338
339
   def read(self, mode='rb'):
       """ read and return a bytestring from reading the path. """
       if py.std.sys.version_info < (2,3):
           for x in 'u', 'U':
               if x in mode:
                   mode = mode.replace(x, '')
->     f = self.open(mode)
       try:
           return f.read()
       finally:
           f.close()