From 65133018f3e86f60b5d8bfe13493920a415810dd Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 27 Apr 2019 03:39:00 +0200 Subject: [PATCH] Terminal plugin is not semi-essential anymore Thanks to https://github.com/pytest-dev/pytest/pull/5138. --- src/_pytest/config/__init__.py | 2 +- testing/test_config.py | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/_pytest/config/__init__.py b/src/_pytest/config/__init__.py index 2617a4589..1a2edf4f8 100644 --- a/src/_pytest/config/__init__.py +++ b/src/_pytest/config/__init__.py @@ -123,7 +123,7 @@ essential_plugins = ( ) default_plugins = essential_plugins + ( - "terminal", # Has essential options, but xdist uses -pno:terminal. + "terminal", "debugging", "unittest", "capture", diff --git a/testing/test_config.py b/testing/test_config.py index f5ebdad5a..ecb8fd403 100644 --- a/testing/test_config.py +++ b/testing/test_config.py @@ -1232,8 +1232,10 @@ def test_config_blocked_default_plugins(testdir, plugin): if plugin != "terminal": result.stdout.fnmatch_lines(["* 1 passed in *"]) - if plugin != "terminal": # fails to report due to its options being used elsewhere. - p = testdir.makepyfile("def test(): assert 0") - result = testdir.runpytest(str(p), "-pno:%s" % plugin) - assert result.ret == EXIT_TESTSFAILED + p = testdir.makepyfile("def test(): assert 0") + result = testdir.runpytest(str(p), "-pno:%s" % plugin) + assert result.ret == EXIT_TESTSFAILED + if plugin != "terminal": result.stdout.fnmatch_lines(["* 1 failed in *"]) + else: + assert result.stdout.lines == [""]