Display extra information when pytest exits due to unrecognized options in the command-line.
(pytester: Pytester)
| 1139 | |
| 1140 | |
| 1141 | def test_invalid_options_show_extra_information(pytester: Pytester) -> None: |
| 1142 | """Display extra information when pytest exits due to unrecognized |
| 1143 | options in the command-line.""" |
| 1144 | pytester.makeini( |
| 1145 | """ |
| 1146 | [pytest] |
| 1147 | addopts = --invalid-option |
| 1148 | """ |
| 1149 | ) |
| 1150 | result = pytester.runpytest() |
| 1151 | result.stderr.fnmatch_lines( |
| 1152 | [ |
| 1153 | "*error: unrecognized arguments: --invalid-option*", |
| 1154 | "* inifile: %s*" % pytester.path.joinpath("tox.ini"), |
| 1155 | "* rootdir: %s*" % pytester.path, |
| 1156 | ] |
| 1157 | ) |
| 1158 | |
| 1159 | |
| 1160 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected