call site 1 for path.local.parts
doc/test_conftest.py - line 72
64
65
66
67
68
69
70
71
72
73
74
75
76
77
   def test_doctest_eol(): 
       # XXX get rid of the next line: 
       py.magic.autopath().dirpath('conftest.py').copy(tmpdir.join('conftest.py'))
   
       ytxt = tmpdir.join('y.txt')
       ytxt.write(py.code.Source(".. >>> 1 + 1\r\n   2\r\n\r\n"))
       config = py.test.config._reparse([ytxt]) 
       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 63
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/session.py - line 79
72
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
   def runtraced(self, colitem):
       if self.shouldclose(): 
           raise Exit, "received external close signal" 
   
       outcome = None 
       colitem.startcapture() 
       try: 
->         self.start(colitem)
           try: 
               try:
                   if colitem._stickyfailure: 
                       raise colitem._stickyfailure 
                   outcome = self.run(colitem) 
               except (KeyboardInterrupt, Exit): 
                   raise 
               except Outcome, outcome: 
                   if outcome.excinfo is None: 
                       outcome.excinfo = py.code.ExceptionInfo() 
               except: 
                   excinfo = py.code.ExceptionInfo() 
                   outcome = Failed(excinfo=excinfo) 
               assert (outcome is None or 
                       isinstance(outcome, (list, Outcome)))
           finally: 
               self.finish(colitem, outcome) 
           if isinstance(outcome, Failed) and self.config.option.exitfirst:
               py.test.exit("exit on first problem configured.", item=colitem)
       finally: 
           colitem.finishcapture()
test/terminal/terminal.py - line 48
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
   def start(self, colitem):
       super(TerminalSession, self).start(colitem) 
       if self.config.option.collectonly: 
           cols = self._opencollectors
           self.out.line('    ' * len(cols) + repr(colitem))
           cols.append(colitem) 
       else: 
           cls = getattr(colitem, '__class__', None)
           if cls is None:
               return
           for typ in py.std.inspect.getmro(cls):
               meth = getattr(self, 'start_%s' % typ.__name__, None)
               if meth:
->                 meth(colitem)
                   break 
           colitem.start = py.std.time.time() 
test/terminal/terminal.py - line 54
52
53
54
55
56
57
58
   def start_Module(self, colitem): 
       if self.config.option.verbose == 0: 
->         abbrev_fn = getrelpath(py.path.local('.xxx.'), colitem.fspath)
           self.out.write('%s' % (abbrev_fn, ))
       else: 
           self.out.line()
           self.out.line("+ testmodule: %s" % colitem.fspath) 
test/terminal/terminal.py - line 9
8
9
10
11
12
13
14
15
16
17
   def getrelpath(source, dest): 
->     base = source.common(dest)
       if not base: 
           return None 
       # with posix local paths '/' is always a common base
       relsource = source.relto(base)
       reldest = dest.relto(base)
       n = relsource.count(source.sep)
       target = dest.sep.join(('..', )*n + (reldest, ))
       return target 
path/common.py - line 170
165
166
167
168
169
170
171
172
173
174
   def common(self, other):
       """ return the common part shared with the other path
               or None if there is no common part.
           """
       last = None
->     for x, y in zip(self.parts(), other.parts()):
           if x != y:
               return last
           last = x
       return last