Hi Andy,
Probably there is some error that his hidden behind this weird traceback.
Can't look into it at the moment. Can you come with a repeatable example
and maybe file an issue? In any case i am off for three weeks so don't
expect an answer from my side, maybe somebody else can help you, though.
cheers,
holger
On Fri, Dec 10, 2010 at 09:17 -0500, Andy Fundinger wrote:
> Continuing my attempted upgrade to pytest 2.0.0 I'm running into some errors
> with using xdist for parallel testing, this test is meant to run on two local
> nodes in parallel and boxed, but somehow it's trying to remove something that
> isn't there. Any ideas? The full log is below with a few bits removed
> because they reference my source code, if they're critical I can obscure the
> data rather than removing them or try to reproduce with non-project code.
>
>
> Andy Fundinger
>
>
>
> scheduling tests via LoadScheduling
> INTERNALERROR> config = <_pytest.config.Config object
> at 0xff22a90>
> INTERNALERROR>
> INTERNALERROR> def
> pytest_cmdline_main(config):
> INTERNALERROR>
> """ default command line protocol for initialization, session,
> INTERNALERROR>
> running tests and reporting. """
> INTERNALERROR>
> session = Session(config)
> INTERNALERROR>
> session.exitstatus = EXIT_OK
> INTERNALERROR>
> try:
> INTERNALERROR>
> config.pluginmanager.do_configure(config)
> INTERNALERROR>
> config.hook.pytest_sessionstart(session=session)
> INTERNALERROR>
> config.hook.pytest_collection(session=session)
> INTERNALERROR> > config.hook.pytest_runtestloop(session=session)
> INTERNALERROR>
> INTERNALERROR> config =
> <_pytest.config.Config object at 0xff22a90>
> INTERNALERROR> session = <Session
> 'gauss_tools'>
> INTERNALERROR>
> INTERNALERROR>
> /home/andy/trunk/ext_linux64/python264/lib/python2.6/site-packages/pytest-2.0.1.dev5-py2.6.egg/_pytest/main.py:65:
> INTERNALERROR> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> INTERNALERROR>
> INTERNALERROR> self = <HookCaller
> 'pytest_runtestloop'>
> INTERNALERROR>
> INTERNALERROR> def __call__(self,
> **kwargs):
> INTERNALERROR>
> methods = self.hookrelay._pm.listattr(self.name)
> INTERNALERROR> >
> return self._docall(methods, kwargs)
> INTERNALERROR>
> INTERNALERROR> kwargs =
> {'session': <Session 'gauss_tools'>}
> INTERNALERROR> methods = [<function
> pytest_runtestloop at 0x1001b758>, <bound method
> DSession.pytest_runtestloop of <xdist.dsession.DSession instance at
> 0x180b5368>>]
> INTERNALERROR> self =
> <HookCaller 'pytest_runtestloop'>
> INTERNALERROR>
> INTERNALERROR>
> /home/andy/trunk/ext_linux64/python264/lib/python2.6/site-packages/pytest-2.0.1.dev5-py2.6.egg/_pytest/core.py:390:
> INTERNALERROR> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> INTERNALERROR>
> INTERNALERROR> self = <HookCaller
> 'pytest_runtestloop'>
> INTERNALERROR> methods = [<function pytest_runtestloop
> at 0x1001b758>, <bound method DSession.pytest_runtestloop of
> <xdist.dsession.DSession instance at 0x180b5368>>]
> INTERNALERROR> kwargs = {'session': <Session
> 'gauss_tools'>}
> INTERNALERROR>
> INTERNALERROR> def _docall(self,
> methods, kwargs):
> INTERNALERROR>
> self.trace(self.name, kwargs)
> INTERNALERROR>
> self.trace.root.indent += 1
> INTERNALERROR>
> mc = MultiCall(methods, kwargs, firstresult=self.firstresult)
> INTERNALERROR>
> try:
> INTERNALERROR>
> > res =
> mc.execute()
> INTERNALERROR>
> INTERNALERROR> kwargs =
> {'session': <Session 'gauss_tools'>}
> INTERNALERROR>
> mc = <MultiCall 0 results, 1
> meths, kwargs={'session': <Session 'gauss_tools'>}>
> INTERNALERROR> methods = [<function
> pytest_runtestloop at 0x1001b758>, <bound method
> DSession.pytest_runtestloop of <xdist.dsession.DSession instance at
> 0x180b5368>>]
> INTERNALERROR> self =
> <HookCaller 'pytest_runtestloop'>
> INTERNALERROR>
> INTERNALERROR>
> /home/andy/trunk/ext_linux64/python264/lib/python2.6/site-packages/pytest-2.0.1.dev5-py2.6.egg/_pytest/core.py:401:
> INTERNALERROR> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> INTERNALERROR>
> INTERNALERROR> self = <MultiCall 0 results, 1 meths,
> kwargs={'session': <Session 'gauss_tools'>}>
> INTERNALERROR>
> INTERNALERROR> def execute(self):
> INTERNALERROR>
> while self.methods:
> INTERNALERROR>
> method = self.methods.pop()
> INTERNALERROR>
> kwargs = self.getkwargs(method)
> INTERNALERROR>
> > res =
> method(**kwargs)
> INTERNALERROR>
> INTERNALERROR> kwargs = {}
> INTERNALERROR> method = <bound
> method DSession.pytest_runtestloop of <xdist.dsession.DSession instance at
> 0x180b5368>>
> INTERNALERROR> self =
> <MultiCall 0 results, 1 meths, kwargs={'session': <Session
> 'gauss_tools'>}>
> INTERNALERROR>
> INTERNALERROR>
> /home/andy/trunk/ext_linux64/python264/lib/python2.6/site-packages/pytest-2.0.1.dev5-py2.6.egg/_pytest/core.py:322:
> INTERNALERROR> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> INTERNALERROR>
> INTERNALERROR> self = <xdist.dsession.DSession
> instance at 0x180b5368>
> INTERNALERROR>
> INTERNALERROR> def
> pytest_runtestloop(self):
> INTERNALERROR>
> numnodes = len(self.nodemanager.specs)
> INTERNALERROR>
> dist = self.config.getvalue("dist")
> INTERNALERROR>
> if dist == "load":
> INTERNALERROR>
> self.sched = LoadScheduling(numnodes, log=self.log)
> INTERNALERROR>
> elif dist == "each":
> INTERNALERROR>
> self.sched = EachScheduling(numnodes, log=self.log)
> INTERNALERROR>
> else:
> INTERNALERROR>
> assert 0, dist
> INTERNALERROR>
> self.shouldstop = False
> INTERNALERROR>
> self.session_finished = False
> INTERNALERROR>
> while not self.session_finished:
> INTERNALERROR>
> >
> self.loop_once()
> INTERNALERROR>
> INTERNALERROR> dist =
> 'load'
> INTERNALERROR> numnodes = 2
> INTERNALERROR> self =
> <xdist.dsession.DSession instance at 0x180b5368>
> INTERNALERROR>
> INTERNALERROR>
> /home/andy/trunk/ext_linux64/python264/lib/python2.6/site-packages/pytest_xdist-1.6.dev2-py2.6.egg/xdist/dsession.py:204:
> INTERNALERROR> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> INTERNALERROR>
> INTERNALERROR> self = <xdist.dsession.DSession
> instance at 0x180b5368>
> INTERNALERROR>
> INTERNALERROR> def
> loop_once(self):
> INTERNALERROR>
> """ process one callback from one of the slaves.
> """
> INTERNALERROR> while
> 1:
> INTERNALERROR>
> try:
> INTERNALERROR>
> eventcall = self.queue.get(timeout=2.0)
> INTERNALERROR>
> break
> INTERNALERROR>
> except queue.Empty:
> INTERNALERROR>
> continue
> INTERNALERROR> callname,
> kwargs = eventcall
> INTERNALERROR>
> assert callname, kwargs
> INTERNALERROR>
> method = "slave_" + callname
> INTERNALERROR>
> call = getattr(self, method)
> INTERNALERROR>
> self.log("calling method: %s(**%s)" % (method, kwargs))
> INTERNALERROR> >
> call(**kwargs)
> INTERNALERROR>
> INTERNALERROR> call =
> <bound method DSession.slave_testreport of <xdist.dsession.DSession
> instance at 0x180b5368>>
> INTERNALERROR> callname = 'testreport'
> INTERNALERROR> eventcall = ('testreport', {'node':
> <SlaveController gw0>, 'rep': {snip}
>
> when='call' outcome='passed'>})
> INTERNALERROR> kwargs = {'node':
> <SlaveController gw0>, 'rep': {snip}
> when='call' outcome='passed'>}
> INTERNALERROR> method =
> 'slave_testreport'
> INTERNALERROR> self =
> <xdist.dsession.DSession instance at 0x180b5368>
> INTERNALERROR>
> INTERNALERROR>
> /home/andy/trunk/ext_linux64/python264/lib/python2.6/site-packages/pytest_xdist-1.6.dev2-py2.6.egg/xdist/dsession.py:222:
> INTERNALERROR> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> INTERNALERROR>
> INTERNALERROR> self = <xdist.dsession.DSession
> instance at 0x180b5368>, node = <SlaveController gw0>
> INTERNALERROR> rep = <TestReport {snip}
> when='call' outcome='passed'>
> INTERNALERROR>
> INTERNALERROR> def
> slave_testreport(self, node, rep):
> INTERNALERROR> if
> rep.when in ("setup", "call"):
> INTERNALERROR>
> >
> self.sched.remove_item(node, rep.nodeid)
> INTERNALERROR>
> INTERNALERROR> node =
> <SlaveController gw0>
> INTERNALERROR>
> rep = <TestReport {snip}
> when='call' outcome='passed'>
> INTERNALERROR> self =
> <xdist.dsession.DSession instance at 0x180b5368>
> INTERNALERROR>
> INTERNALERROR>
> /home/andy/trunk/ext_linux64/python264/lib/python2.6/site-packages/pytest_xdist-1.6.dev2-py2.6.egg/xdist/dsession.py:283:
> INTERNALERROR> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> INTERNALERROR>
> INTERNALERROR> self = <xdist.dsession.LoadScheduling
> instance at 0x1930f368>, node = <SlaveController gw0>
>
>
> {item removed}
>
> INTERNALERROR>
> INTERNALERROR> def
> remove_item(self, node, item):
> INTERNALERROR>
> if item not in self.item2nodes:
> INTERNALERROR>
> raise AssertiDN_XSS_NEUTRALIZE_onError(item, self.item2nodes)
> INTERNALERROR>
> nodes = self.item2nodes[item]
> INTERNALERROR>
> if node in nodes: # the node might have gone down already
> INTERNALERROR>
> nodes.remove(node)
> INTERNALERROR>
> #if not nodes:
> INTERNALERROR>
> # del self.item2nodes[item]
> INTERNALERROR>
> pending = self.node2pending[node]
> INTERNALERROR> >
> pending.remove(item)
> INTERNALERROR> E
> ValueError: list.remove(x): x not in list
> INTERNALERROR>
> {item and pending removed}
>
> INTERNALERROR> node =
> <SlaveController gw0>
>
> INTERNALERROR> nodes = []
> INTERNALERROR> self =
> <xdist.dsession.LoadScheduling instance at 0x1930f368>
>
> INTERNALERROR>
>
>
> INTERNALERROR>
> /home/andy/trunk/ext_linux64/python264/lib/python2.6/site-packages/pytest_xdist-1.6.dev2-py2.6.egg/xdist/dsession.py:103:
> ValueError
>
>
> Regards,
>
> Andy Fundinger
>
> Risk Focus Inc.
> 424.243.6227
>
>
> New York Office: +1 917 725 6006 Fax: +1 917 591 1616
>
> London Office: +44 (0) 207 760 7184 Fax: +44 (0) 207 691 7165
> _______________________________________________
> py-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/py-dev
--
_______________________________________________
py-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/py-dev