call site 0 for path.svnwc.dirpath
test/testing/test_collect.py - line 259
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
   def test_custom_NONpython_collection_from_conftest():
       o = tmpdir.ensure('customconfigtest_nonpython', dir=1)
       o.ensure('conftest.py').write("""if 1:
           import py
           class CustomItem(py.test.collect.Item): 
               def run(self):
                   pass
   
           class Directory(py.test.collect.Directory):
               def filefilter(self, fspath):
                   return fspath.check(basestarts='check_', ext='.txt')
               def join(self, name):
                   if not name.endswith('.txt'): 
                       return super(Directory, self).join(name) 
                   p = self.fspath.join(name) 
                   if p.check(file=1): 
                       return CustomItem(p, parent=self)
           """)
       checkfile = o.ensure('somedir', 'moredir', 'check_something.txt')
   
       for x in (o, checkfile, checkfile.dirpath()): 
           print "checking that %s returns custom items" % (x,) 
           config = py.test.config._reparse([x])
           col = config._getcollector(x)
           assert len(list(col._tryiter(py.test.collect.Item))) == 1
           #assert items[1].__class__.__name__ == 'MyFunction'
   
       # test that running a session works from the directories
       old = o.chdir() 
       try: 
           config = py.test.config._reparse([]) 
           out = py.std.cStringIO.StringIO()
           session = config._getsessionclass()(config, out) 
->         session.main() 
           l = session.getitemoutcomepairs(Passed) 
           assert len(l) == 1
       finally: 
           old.chdir() 
   
       # test that running the file directly works 
       config = py.test.config._reparse([str(checkfile)]) 
       out = py.std.cStringIO.StringIO()
       session = config._getsessionclass()(config, out) 
       session.main() 
       l = session.getitemoutcomepairs(Passed) 
       assert len(l) == 1
test/session.py - line 59
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
   def main(self): 
       """ main loop for running tests. """
       colitems = self.config.getcolitems()
       try:
->         self.header(colitems) 
           try:
               try:
                   for colitem in colitems: 
                       self.runtraced(colitem)
               except KeyboardInterrupt: 
                   raise 
           finally: 
               self.footer(colitems) 
       except Exit, ex:
           pass
       return self.getitemoutcomepairs(Failed)
test/terminal/terminal.py - line 132
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
   def header(self, colitems): 
       super(TerminalSession, self).header(colitems) 
       self.out.sep("=", "test process starts")
       option = self.config.option 
       modes = []
       for name in 'looponfailing', 'exitfirst', 'nomagic': 
           if getattr(option, name): 
               modes.append(name) 
       #if self._isremoteoption._fromremote:
       #    modes.insert(0, 'child process') 
       #else:
       #    modes.insert(0, 'inprocess')
       #mode = "/".join(modes)
       #self.out.line("testing-mode: %s" % mode)
       self.out.line("executable:   %s  (%s)" %
                         (py.std.sys.executable, repr_pythonversion()))
->     rev = py.__pkg__.getrev()
       self.out.line("using py lib: %s <rev %s>" % (
                      py.path.local(py.__file__).dirpath(), rev))
       
       if self.config.option.traceconfig or self.config.option.verbose: 
   
           for x in colitems: 
               self.out.line("test target:  %s" %(x.fspath,))
   
           conftestmodules = self.config._conftest.getconftestmodules(None)
           for i,x in py.builtin.enumerate(conftestmodules):
               self.out.line("initial conf %d: %s" %(i, x.__file__)) 
   
           #for i, x in py.builtin.enumerate(py.test.config.configpaths):
           #    self.out.line("initial testconfig %d: %s" %(i, x))
           #additional = py.test.config.getfirst('additionalinfo')
           #if additional:
           #    for key, descr in additional():
           #        self.out.line("%s: %s" %(key, descr))
       self.out.line() 
       self.starttime = now()
initpkg.py - line 149
147
148
149
150
151
152
153
154
155
   def getrev(self):
       import py
->     p = py.path.svnwc(self.module.__file__).dirpath()
       try:
           return p.info().rev
       except (KeyboardInterrupt, MemoryError, SystemExit):
           raise
       except:
           return 'unknown'