call site 0 for test.config.__init__
test/rsession/testing/test_lsession.py - line 67
64
65
66
67
   def test_normal(self):
       if not hasattr(py.std.os, 'fork'):
           py.test.skip('operating system not supported')
->     self.example_distribution(box_runner)
test/rsession/testing/test_lsession.py - line 35
16
17
18
19
20
21
22
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
54
55
56
57
58
59
60
61
62
   def example_distribution(self, runner):
       # XXX find a better way for the below 
       tmpdir = tmp
       dirname = "sub_lsession"+runner.func_name
       tmpdir.ensure(dirname, "__init__.py")
       tmpdir.ensure(dirname, "test_one.py").write(py.code.Source("""
               def test_1(): 
                   pass
               def test_2():
                   assert 0
               def test_3():
                   raise ValueError(23)
               def test_4(someargs):
                   pass
               #def test_5():
               #    import os
               #    os.kill(os.getpid(), 11)
           """))
       args = [str(tmpdir.join(dirname))]
->     config = py.test.config._reparse(args)
       lsession = LSession(config)
       allevents = []
       lsession.main(reporter=allevents.append, runner=runner)
       testevents = [x for x in allevents 
                       if isinstance(x, repevent.ReceivedItemOutcome)]
       assert len(testevents)
       passevents = [i for i in testevents if i.outcome.passed]
       failevents = [i for i in testevents if i.outcome.excinfo]
       skippedevents = [i for i in testevents if i.outcome.skipped]
       signalevents = [i for i in testevents if i.outcome.signal]
       assert len(passevents) == 1
       assert len(failevents) == 3
       assert len(skippedevents) == 0
       #assert len(signalevents) == 1
       tb = failevents[0].outcome.excinfo.traceback
       assert str(tb[0].path).find("test_one") != -1
       assert str(tb[0].source).find("test_2") != -1
       assert failevents[0].outcome.excinfo.typename == 'AssertionError'
       tb = failevents[1].outcome.excinfo.traceback
       assert str(tb[0].path).find("test_one") != -1
       assert str(tb[0].source).find("test_3") != -1
       assert failevents[1].outcome.excinfo.typename == 'ValueError'
       assert str(failevents[1].outcome.excinfo.value) == '23'
       tb = failevents[2].outcome.excinfo.traceback
       assert failevents[2].outcome.excinfo.typename == 'TypeError'
       assert str(tb[0].path).find("executor") != -1
       assert str(tb[0].source).find("execute") != -1
test/config.py - line 186
180
181
182
183
184
185
186
187
188
189
190
   def _reparse(self, args):
       """ this is used from tests that want to re-invoke parse(). """
       #assert args # XXX should not be empty
       global config_per_process
       oldconfig = py.test.config
       try:
->         config_per_process = py.test.config = Config()
           config_per_process.parse(args) 
           return config_per_process
       finally: 
           config_per_process = py.test.config = oldconfig