[7.0.x] Improve error message for malformed pyproject.toml files
This commit is contained in:
committed by
pytest bot
parent
c0a03a247f
commit
b1f9e58196
@@ -163,7 +163,17 @@ class TestParseIni:
|
||||
pytester.path.joinpath("pytest.ini").write_text("addopts = -x")
|
||||
result = pytester.runpytest()
|
||||
assert result.ret != 0
|
||||
result.stderr.fnmatch_lines(["ERROR: *pytest.ini:1: no section header defined"])
|
||||
result.stderr.fnmatch_lines("ERROR: *pytest.ini:1: no section header defined")
|
||||
|
||||
def test_toml_parse_error(self, pytester: Pytester) -> None:
|
||||
pytester.makepyprojecttoml(
|
||||
"""
|
||||
\\"
|
||||
"""
|
||||
)
|
||||
result = pytester.runpytest()
|
||||
assert result.ret != 0
|
||||
result.stderr.fnmatch_lines("ERROR: *pyproject.toml: Invalid statement*")
|
||||
|
||||
@pytest.mark.xfail(reason="probably not needed")
|
||||
def test_confcutdir(self, pytester: Pytester) -> None:
|
||||
|
||||
Reference in New Issue
Block a user