2010-11-21 04:35:55 +08:00
|
|
|
import pytest
|
2018-05-23 22:48:46 +08:00
|
|
|
|
2010-11-21 04:35:55 +08:00
|
|
|
xfail = pytest.mark.xfail
|
|
|
|
|
2018-05-23 22:48:46 +08:00
|
|
|
|
2010-11-21 04:35:55 +08:00
|
|
|
@xfail
|
|
|
|
def test_hello():
|
|
|
|
assert 0
|
|
|
|
|
2018-05-23 22:48:46 +08:00
|
|
|
|
2010-11-21 04:35:55 +08:00
|
|
|
@xfail(run=False)
|
|
|
|
def test_hello2():
|
|
|
|
assert 0
|
|
|
|
|
2018-05-23 22:48:46 +08:00
|
|
|
|
2010-11-21 04:35:55 +08:00
|
|
|
@xfail("hasattr(os, 'sep')")
|
|
|
|
def test_hello3():
|
|
|
|
assert 0
|
|
|
|
|
2018-05-23 22:48:46 +08:00
|
|
|
|
2010-11-21 04:35:55 +08:00
|
|
|
@xfail(reason="bug 110")
|
|
|
|
def test_hello4():
|
|
|
|
assert 0
|
|
|
|
|
2018-05-23 22:48:46 +08:00
|
|
|
|
2011-03-04 06:22:55 +08:00
|
|
|
@xfail('pytest.__version__[0] != "17"')
|
2010-11-21 04:35:55 +08:00
|
|
|
def test_hello5():
|
2011-03-04 06:22:55 +08:00
|
|
|
assert 0
|
|
|
|
|
2018-05-23 22:48:46 +08:00
|
|
|
|
2011-03-04 06:22:55 +08:00
|
|
|
def test_hello6():
|
2010-11-21 04:35:55 +08:00
|
|
|
pytest.xfail("reason")
|
2014-07-27 00:10:32 +08:00
|
|
|
|
2018-05-23 22:48:46 +08:00
|
|
|
|
2014-07-27 00:10:32 +08:00
|
|
|
@xfail(raises=IndexError)
|
2014-08-08 03:41:51 +08:00
|
|
|
def test_hello7():
|
2014-07-27 00:10:32 +08:00
|
|
|
x = []
|
2014-07-27 00:24:55 +08:00
|
|
|
x[1] = 1
|