summaryrefslogtreecommitdiff
path: root/testing/test_setupplan.py
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-10-15 00:40:38 +0200
committerDaniel Hahler <git@thequod.de>2019-10-15 00:41:05 +0200
commitc2ae0e0dc631cbcbc8921b79bcdc7740dad33aaf (patch)
tree1d13116e912d49b6c6e519c84f4ab5e48572c8f7 /testing/test_setupplan.py
parentafabbb6346e1b76cf84f367c3198e3313fbef959 (diff)
downloadpytest-c2ae0e0dc631cbcbc8921b79bcdc7740dad33aaf.tar.gz
tests: move tests for setuponly/setupplan
Forgotten in 032ce8baf.
Diffstat (limited to 'testing/test_setupplan.py')
-rw-r--r--testing/test_setupplan.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/testing/test_setupplan.py b/testing/test_setupplan.py
new file mode 100644
index 000000000..e323ba240
--- /dev/null
+++ b/testing/test_setupplan.py
@@ -0,0 +1,19 @@
+def test_show_fixtures_and_test(testdir, dummy_yaml_custom_test):
+ """ Verifies that fixtures are not executed. """
+ testdir.makepyfile(
+ """
+ import pytest
+ @pytest.fixture
+ def arg():
+ assert False
+ def test_arg(arg):
+ assert False
+ """
+ )
+
+ result = testdir.runpytest("--setup-plan")
+ assert result.ret == 0
+
+ result.stdout.fnmatch_lines(
+ ["*SETUP F arg*", "*test_arg (fixtures used: arg)", "*TEARDOWN F arg*"]
+ )