Skip to content

Commit 3f1a1cb

Browse files
committed
Add test_pytester_subprocess_with_plugins
1 parent 8791b66 commit 3f1a1cb

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

testing/test_pytester.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,20 @@ def test_timeout():
472472
pytester.runpytest_subprocess(testfile, timeout=1)
473473

474474

475+
def test_pytester_subprocess_with_plugins(pytester: Pytester) -> None:
476+
testfile = pytester.makepyfile(
477+
"""
478+
def test_plugins(pytestconfig):
479+
plugins = pytestconfig.pluginmanager.list_name_plugin()
480+
assert ("plug_1", None) in plugins
481+
assert ("plug_2", None) in plugins
482+
"""
483+
)
484+
pytester.plugins.extend(["no:plug_1", "no:plug_2"])
485+
486+
pytester.runpytest_subprocess().assert_outcomes(passed=1)
487+
488+
475489
def test_linematcher_with_nonlist() -> None:
476490
"""Test LineMatcher with regard to passing in a set (accidentally)."""
477491
from _pytest._code.source import Source

0 commit comments

Comments
 (0)