call site 0 for magic.invoke
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
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 117
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()
test/session.py - line 19
16
17
18
19
   def header(self, colitems):
       """ setup any neccessary resources ahead of the test run. """
       if not self.config.option.nomagic:
->         py.magic.invoke(assertion=1)