Custom .cfg files with [tool:pytest] section are read correctly
(self, tmp_path: Path)
| 51 | assert load_config_dict_from_file(fn) is None |
| 52 | |
| 53 | def test_valid_cfg_file(self, tmp_path: Path) -> None: |
| 54 | """Custom .cfg files with [tool:pytest] section are read correctly""" |
| 55 | fn = tmp_path / "custom.cfg" |
| 56 | fn.write_text("[tool:pytest]\nx=1", encoding="utf-8") |
| 57 | assert load_config_dict_from_file(fn) == { |
| 58 | "x": ConfigValue("1", origin="file", mode="ini") |
| 59 | } |
| 60 | |
| 61 | def test_unsupported_pytest_section_in_cfg_file(self, tmp_path: Path) -> None: |
| 62 | """.cfg files with [pytest] section are no longer supported and should fail to alert users""" |
nothing calls this directly
no test coverage detected