We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b6622f commit 3a8d401Copy full SHA for 3a8d401
testing/test_terminal.py
@@ -998,6 +998,22 @@ def test_showlocals():
998
]
999
)
1000
1001
+ def test_noshowlocals_addopts_override(self, pytester: Pytester) -> None:
1002
+ pytester.makeini("[pytest]\naddopts=--showlocals")
1003
+ p1 = pytester.makepyfile(
1004
+ """
1005
+ def test_noshowlocals():
1006
+ x = 3
1007
+ y = "x" * 5000
1008
+ assert 0
1009
1010
+ )
1011
+
1012
+ # Override global --showlocals for py.test via arg
1013
+ result = pytester.runpytest(p1, "--no-showlocals")
1014
+ result.stdout.no_fnmatch_line("x* = 3")
1015
+ result.stdout.no_fnmatch_line("y* = 'xxxxxx*")
1016
1017
def test_showlocals_short(self, pytester: Pytester) -> None:
1018
p1 = pytester.makepyfile(
1019
"""
0 commit comments