Test that a None help param raises a TypeError.
(pytester: Pytester)
| 46 | |
| 47 | |
| 48 | def test_none_help_param_raises_exception(pytester: Pytester) -> None: |
| 49 | """Test that a None help param raises a TypeError.""" |
| 50 | pytester.makeconftest( |
| 51 | """ |
| 52 | def pytest_addoption(parser): |
| 53 | parser.addini("test_ini", None, default=True, type="bool") |
| 54 | """ |
| 55 | ) |
| 56 | result = pytester.runpytest("--help") |
| 57 | result.stderr.fnmatch_lines( |
| 58 | ["*TypeError: help argument cannot be None for test_ini*"] |
| 59 | ) |
| 60 | |
| 61 | |
| 62 | def test_empty_help_param(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected