call site 0 for path.local.stat
apigen/rest/testing/test_rest.py - line 140
137
138
139
140
141
142
143
   def test_write_section(self):
       tempdir = temppath.ensure('htmldirwriter', dir=1)
       hdw = self.get_filled_writer(HTMLDirWriter, HTMLHandler, HTMLHandler,
->                                  tempdir)
       assert tempdir.join('foo.html').check(file=1)
       assert tempdir.join('bar.html').check(file=1)
       assert tempdir.join('foo.html').read().startswith('<html>')
apigen/rest/testing/test_rest.py - line 88
86
87
88
89
90
   def get_filled_writer(self, writerclass, *args, **kwargs):
       dw = writerclass(*args, **kwargs)
->     dw.write_section('foo', Rest(Paragraph('foo data')))
       dw.write_section('bar', Rest(Paragraph('bar data')))
       return dw
apigen/rest/genrest.py - line 176
168
169
170
171
172
173
174
175
176
   def write_section(self, name, rest):
       if name == 'index':
           handler = self.indexhandler
       else:
           handler = self.filehandler
       h = handler(name)
       t = RestTransformer(rest)
       t.parse(h)
->     self.directory.ensure('%s.html' % (name,)).write(h.html)
path/local/local.py - line 309
299
300
301
302
303
304
305
306
307
308
309
310
311
   def ensure(self, *args, **kwargs):
       """ ensure that an args-joined path exists (by default as
               a file). if you specify a keyword argument 'dir=True'
               then the path is forced to be a directory path.
           """
       p = self.join(*args)
       if kwargs.get('dir', 0):
           return p._ensuredirs()
       else:
           p.dirpath()._ensuredirs()
->         if not p.check(file=1):
               p.write("")
           return p
path/common.py - line 114
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
   def check(self, **kw):
       """ check a path for existence, or query its properties
   
               without arguments, this returns True if the path exists (on the
               filesystem), False if not
   
               with (keyword only) arguments, the object compares the value
               of the argument with the value of a property with the same name
               (if it has one, else it raises a TypeError)
   
               when for example the keyword argument 'ext' is '.py', this will
               return True if self.ext == '.py', False otherwise
           """
       if kw:
           kw = kw.copy()
           if not checktype(self, kw):
               return False
       else:
           kw = {'exists' : 1}
->     return self.Checkers(self)._evaluate(kw)
path/common.py - line 75
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
   def _evaluate(self, kw):
       for name, value in kw.items():
           invert = False
           meth = None
           try:
               meth = getattr(self, name)
           except AttributeError:
               if name[:3] == 'not':
                   invert = True
                   try:
                       meth = getattr(self, name[3:])
                   except AttributeError:
                       pass
           if meth is None:
               raise TypeError, "no %r checker available for %r" % (name, self.path)
           try:
               if meth.im_func.func_code.co_argcount > 1:
                   if (not meth(value)) ^ invert:
                       return False
               else:
->                 if bool(value) ^ bool(meth()) ^ invert:
                       return False
           except (py.error.ENOENT, py.error.ENOTDIR):
               for name in self._depend_on_existence:
                   if name in kw:
                       if kw.get(name):
                           return False
                   name = 'not' + name
                   if name in kw:
                       if not kw.get(name):
                           return False
       return True
path/local/local.py - line 42
41
42
   def file(self):
->     return stat.S_ISREG(self._stat().mode)
path/local/local.py - line 33
28
29
30
31
32
33
34
35
36
   def _stat(self):
       try:
           return self._statcache
       except AttributeError:
           try:
->             self._statcache = self.path.stat()
           except py.error.ELOOP:
               self._statcache = self.path.lstat()
           return self._statcache