call site 1 for test.config.getvalue
doc/test_conftest.py - line 47
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
   def test_doctest_basic(): 
       # XXX get rid of the next line: 
       py.magic.autopath().dirpath('conftest.py').copy(tmpdir.join('conftest.py'))
   
       xtxt = tmpdir.join('x.txt')
       xtxt.write(py.code.Source("""
           .. 
              >>> from os.path import abspath 
   
           hello world 
   
              >>> assert abspath 
              >>> i=3
              >>> print i
              3
   
           yes yes
   
               >>> i
               3
   
           end
       """))
       config = py.test.config._reparse([xtxt]) 
->     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/config.py - line 139
137
138
139
140
141
142
   def initsession(self):
       """ return an initialized session object. """
->     cls = self._getsessionclass()
       session = cls(self)
       session.fixoptions()
       return session
test/config.py - line 151
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
   def _getsessionclass(self): 
       """ return Session class determined from cmdline options
               and looked up in initial config modules. 
           """
       if self.option.session is not None:
           return self._conftest.rget(self.option.session)
       else:
->         name = self._getsessionname()
           try:
               return self._conftest.rget(name)
           except KeyError:
               pass
           importpath = globals()[name]
           mod = __import__(importpath, None, None, '__doc__')
           return getattr(mod, name)
test/config.py - line 172
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
   def _getsessionname(self):
       """ return default session name as determined from options. """
       name = 'TerminalSession'
       if self.option.dist:
           name = 'RSession'
       else:
           optnames = 'startserver runbrowser apigen restreport boxed'.split()
           for opt in optnames:
               if getattr(self.option, opt, False):
                   name = 'LSession'
                   break
           else:
->             if self.getvalue('dist_boxed'):
                   name = 'LSession'
               if self.option.looponfailing:
                   name = 'RemoteTerminalSession'
               elif self.option.executable:
                   name = 'RemoteTerminalSession'
       return name