call site 5 for test.collect.Function.__eq__
test/rsession/testing/test_lsession.py - line 197
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
   def test_lsession(self):
       tmpdir = tmp
       tmpdir.ensure("sub4", "__init__.py")
       tmpdir.ensure("sub4", "test_some.py").write(py.code.Source("""
               def test_one(): 
                   pass
               def test_one_one():
                   assert 0
               def test_other():
                   raise ValueError(23)
               def test_two(someargs):
                   pass
           """))
           
       args = [str(tmpdir.join("sub4"))]
       config = py.test.config._reparse(args)
       lsession = LSession(config)
       allevents = []
       allruns = []
       def dummy_runner(item, config, reporter):
           allruns.append(item)
           item.passed = True
           return item
       lsession.main(reporter=allevents.append, runner=dummy_runner)
           
       assert len(allruns) == 4
       testevents = [x for x in allevents 
                       if isinstance(x, repevent.ReceivedItemOutcome)]
       assert len(testevents) == 4
       lst = ['test_one', 'test_one_one', 'test_other', 'test_two']
       for num, i in enumerate(testevents):
->         assert i.item == i.outcome
           assert i.item.name == lst[num]