diff options
author | holger krekel <holger@merlinux.eu> | 2012-06-23 11:32:32 +0200 |
---|---|---|
committer | holger krekel <holger@merlinux.eu> | 2012-06-23 11:32:32 +0200 |
commit | 6e0c30d67d984d653d9dad79a7c43e3cb21f5c4a (patch) | |
tree | eea98a40747ba937e5a5d8ae9a142b2d0676c87f /ISSUES.txt | |
parent | 65cbf591d8265683346212e922f4f6c9c78ded7d (diff) | |
download | pytest-6e0c30d67d984d653d9dad79a7c43e3cb21f5c4a.tar.gz |
fix skip/xfail confusion, reported and discussed on
http://stackoverflow.com/questions/11105828/in-py-test-when-i-explicitly-skip-a-test-that-is-marked-as-xfail-how-can-i-get
Diffstat (limited to 'ISSUES.txt')
-rw-r--r-- | ISSUES.txt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ISSUES.txt b/ISSUES.txt index 365d6fb5e..fd2c8bfc3 100644 --- a/ISSUES.txt +++ b/ISSUES.txt @@ -355,3 +355,31 @@ def test_run(pytester, fslayout): result = pytester.runpytest(p) assert result.ret == 0 assert result.passed == 1 + +Another idea is to allow to define a full scenario including the run +in one content string:: + + runscenario(""" + test_{TESTNAME}.py: + import pytest + @pytest.mark.xfail + def test_that_fails(): + assert 0 + + @pytest.mark.skipif("True") + def test_hello(): + pass + + conftest.py: + import pytest + def pytest_runsetup_setup(item): + pytest.skip("abc") + + runpytest -rsxX + *SKIP*{TESTNAME}* + *1 skipped* + """) + +This could be run with at least three different ways to invoke pytest: +through the shell, through "python -m pytest" and inlined. As inlined +would be the fastest it could be run first (or "--fast" mode). |