(
self, pytester: Pytester, str_val: str, bool_val: bool
)
| 742 | "str_val, bool_val", [("True", True), ("no", False), ("no-ini", True)] |
| 743 | ) |
| 744 | def test_addini_bool( |
| 745 | self, pytester: Pytester, str_val: str, bool_val: bool |
| 746 | ) -> None: |
| 747 | pytester.makeconftest( |
| 748 | """ |
| 749 | def pytest_addoption(parser): |
| 750 | parser.addini("strip", "", type="bool", default=True) |
| 751 | """ |
| 752 | ) |
| 753 | if str_val != "no-ini": |
| 754 | pytester.makeini( |
| 755 | """ |
| 756 | [pytest] |
| 757 | strip=%s |
| 758 | """ |
| 759 | % str_val |
| 760 | ) |
| 761 | config = pytester.parseconfig() |
| 762 | assert config.getini("strip") is bool_val |
| 763 | |
| 764 | def test_addinivalue_line_existing(self, pytester: Pytester) -> None: |
| 765 | pytester.makeconftest( |
nothing calls this directly
no test coverage detected