File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -1300,3 +1300,21 @@ def test_issue4445_import_plugin(testdir):
13001300 "*skipped plugin 'some_plugin': thing*" ,
13011301 ]
13021302 )
1303+
1304+
1305+ def test_issue4445_resultlog (testdir ):
1306+ """#4445: Make sure the warning points to a reasonable location
1307+ See origin of _issue_warning_captured at: _pytest.resultlog.py:35
1308+ """
1309+ testdir .makepyfile (
1310+ """
1311+ def test_dummy():
1312+ pass
1313+ """
1314+ )
1315+ result = testdir .runpytest (
1316+ "--result-log={dir}" .format (dir = testdir .tmpdir .join ("result.log" ))
1317+ )
1318+ # with stacklevel=2 the warning originates from resultlog.pytest_configure
1319+ # and is thrown when --result-log is used
1320+ result .stdout .fnmatch_lines (["*resultlog.py:35*" , "*--result-log is deprecated*" ])
You can’t perform that action at this time.
0 commit comments