Display extra information when pytest exits due to unrecognized options in the command-line.
(pytester: Pytester)
| 1727 | |
| 1728 | |
| 1729 | def test_invalid_options_show_extra_information(pytester: Pytester) -> None: |
| 1730 | """Display extra information when pytest exits due to unrecognized |
| 1731 | options in the command-line.""" |
| 1732 | pytester.makeini( |
| 1733 | """ |
| 1734 | [pytest] |
| 1735 | addopts = --invalid-option |
| 1736 | """ |
| 1737 | ) |
| 1738 | result = pytester.runpytest() |
| 1739 | result.stderr.fnmatch_lines( |
| 1740 | [ |
| 1741 | "*error: unrecognized arguments: --invalid-option*", |
| 1742 | "* inifile: {}*".format(pytester.path.joinpath("tox.ini")), |
| 1743 | f"* rootdir: {pytester.path}*", |
| 1744 | ] |
| 1745 | ) |
| 1746 | |
| 1747 | |
| 1748 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected
searching dependent graphs…