Slight tweak to xfail summary, and added tests
This commit is contained in:
parent
0cd183dc0a
commit
b247f574a3
|
@ -0,0 +1,21 @@
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
def test_pass():
|
||||||
|
...
|
||||||
|
|
||||||
|
|
||||||
|
def test_fail():
|
||||||
|
a,b = 1,2
|
||||||
|
assert a == b
|
||||||
|
|
||||||
|
@pytest.mark.xfail
|
||||||
|
def test_xfail():
|
||||||
|
a,b = 1,2
|
||||||
|
assert a == b
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.xfail
|
||||||
|
def test_xpass():
|
||||||
|
a,b = 1,1
|
||||||
|
assert a == b
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
home = /Library/Frameworks/Python.framework/Versions/3.11/bin
|
||||||
|
include-system-site-packages = false
|
||||||
|
version = 3.11.5
|
||||||
|
prompt = 'pytest'
|
||||||
|
executable = /Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11
|
||||||
|
command = /Library/Frameworks/Python.framework/Versions/3.11/bin/python3 -m venv --prompt="." /Users/okken/projects/pytest/venv
|
|
@ -0,0 +1,3 @@
|
||||||
|
[tool.pytest.ini_options]
|
||||||
|
addopts = "-ra --strict-markers"
|
||||||
|
#xfail_strict = true
|
|
@ -0,0 +1,30 @@
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
def test_pass():
|
||||||
|
print('in test_pass')
|
||||||
|
|
||||||
|
|
||||||
|
def test_fail():
|
||||||
|
print('in test_fail')
|
||||||
|
a,b = 1,2
|
||||||
|
assert a == b
|
||||||
|
|
||||||
|
@pytest.mark.xfail
|
||||||
|
def test_xfail():
|
||||||
|
print('in test_xfail')
|
||||||
|
a,b = 1,2
|
||||||
|
assert a == b
|
||||||
|
|
||||||
|
@pytest.mark.xfail(reason="reason 1")
|
||||||
|
def test_xfail_reason():
|
||||||
|
print('in test_xfail')
|
||||||
|
a,b = 1,2
|
||||||
|
assert a == b
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.xfail(reason="reason 2")
|
||||||
|
def test_xpass():
|
||||||
|
print('in test_xpass')
|
||||||
|
a,b = 1,1
|
||||||
|
assert a == b
|
||||||
|
|
Loading…
Reference in New Issue