diff --git a/py/test/collect.py b/py/test/collect.py index cc1885dcf..51e967f3f 100644 --- a/py/test/collect.py +++ b/py/test/collect.py @@ -25,6 +25,7 @@ The is a schematic example of a tree of collectors and test items:: """ from __future__ import generators import py +from py.__.test.outcome import Skipped, Failed, Passed def configproperty(name): def fget(self): @@ -203,7 +204,7 @@ class Collector(object): try: self._skipbykeyword(keyword) yield self - except py.test.Item.Skipped: + except Skipped: if reporterror is not None: excinfo = py.code.ExceptionInfo() reporterror((excinfo, self)) diff --git a/py/test/rsession/slave.py b/py/test/rsession/slave.py index e61e12dca..56c7e1f43 100644 --- a/py/test/rsession/slave.py +++ b/py/test/rsession/slave.py @@ -5,6 +5,7 @@ Node code for slaves. import py from py.__.test.rsession.executor import RunExecutor, BoxExecutor, AsyncExecutor from py.__.test.rsession.outcome import Outcome +from py.__.test.outcome import Skipped import thread import os @@ -90,7 +91,7 @@ def slave_main(receive, send, path, config, pidinfo): try: node = getnode(nextitem) res = node.run(nextitem) - except py.test.Item.Skipped, s: + except Skipped, s: send(Outcome(skipped=str(s)).make_repr()) except: excinfo = py.code.ExceptionInfo()