call site 0 for process.cmdexec
doc/test_conftest.py - line 87
79
80
81
82
83
84
85
86
87
88
89
90
91
92
   def test_doctest_indentation():
       # XXX get rid of the next line: 
       py.magic.autopath().dirpath('conftest.py').copy(tmpdir.join('conftest.py'))
   
       txt = tmpdir.join('foo.txt')
       txt.write('..\n  >>> print "foo\\n  bar"\n  foo\n    bar\n')
       config = py.test.config._reparse([txt])
       session = config.initsession()
->     session.main()
       l = session.getitemoutcomepairs(Failed)
       assert len(l) == 0
       l = session.getitemoutcomepairs(Passed)
       l2 = session.getitemoutcomepairs(Skipped)
       assert len(l+l2) == 2
test/session.py - line 59
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
   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
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.__package__.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 151
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'
path/svn/wccommand.py - line 418
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
   def info(self, usecache=1):
       """ return an Info structure with svn-provided information. """
       info = usecache and cache.info.get(self)
       if not info:
           try:
->             output = self._svn('info')
           except py.process.cmdexec.Error, e:
               if e.err.find('Path is not a working copy directory') != -1:
                   raise py.error.ENOENT(self, e.err)
               raise
           # XXX SVN 1.3 has output on stderr instead of stdout (while it does
           # return 0!), so a bit nasty, but we assume no output is output
           # to stderr...
           if (output.strip() == '' or 
                   output.lower().find('not a versioned resource') != -1):
               raise py.error.ENOENT(self, output)
           info = InfoSvnWCCommand(output)
   
           # Can't reliably compare on Windows without access to win32api
           if py.std.sys.platform != 'win32': 
               if info.path != self.localpath: 
                   raise py.error.ENOENT(self, "not a versioned resource:" + 
                           " %s != %s" % (info.path, self.localpath)) 
           cache.info[self] = info
       self.rev = info.rev
       return info
path/svn/wccommand.py - line 87
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
   def _svn(self, cmd, *args):
       l = ['svn %s' % cmd]
       args = [self._escape(item) for item in args]
       l.extend(args)
       l.append('"%s"' % self._escape(self.strpath))
       # try fixing the locale because we can't otherwise parse
       string = svncommon.fixlocale() + " ".join(l)
       if DEBUG:
           print "execing", string
       try:
           try:
               key = 'LC_MESSAGES'
               hold = os.environ.get(key)
               os.environ[key] = 'C'
->             out = py.process.cmdexec(string)
           finally:
               if hold:
                   os.environ[key] = hold
               else:
                   del os.environ[key]
       except py.process.cmdexec.Error, e:
           strerr = e.err.lower()
           if strerr.find('file not found') != -1: 
               raise py.error.ENOENT(self) 
           if (strerr.find('file exists') != -1 or 
               strerr.find('file already exists') != -1 or
               strerr.find("can't create directory") != -1):
               raise py.error.EEXIST(self)
           raise
       return out