derive Exit from KeyboardInterrupt to simplify exception catching
--HG-- branch : trunk
This commit is contained in:
@@ -76,6 +76,13 @@ def test_importorskip():
|
||||
print py.code.ExceptionInfo()
|
||||
py.test.fail("spurious skip")
|
||||
|
||||
def test_pytest_exit():
|
||||
try:
|
||||
py.test.exit("hello")
|
||||
except:
|
||||
excinfo = py.code.ExceptionInfo()
|
||||
assert excinfo.errisinstance(KeyboardInterrupt)
|
||||
|
||||
def test_pytest_mark_getattr():
|
||||
from py.__.test.outcome import mark
|
||||
def f(): pass
|
||||
|
||||
Reference in New Issue
Block a user