(tmp_path)
| 206 | |
| 207 | |
| 208 | def test_create_and_write_default_config(tmp_path) -> None: |
| 209 | default_config = create_default_config() |
| 210 | assert 'main' in default_config |
| 211 | |
| 212 | destination = tmp_path / 'myclirc' |
| 213 | write_default_config(str(destination)) |
| 214 | written = destination.read_text(encoding='utf8') |
| 215 | assert '[main]' in written |
| 216 | |
| 217 | destination.write_text('custom', encoding='utf8') |
| 218 | write_default_config(str(destination)) |
| 219 | assert destination.read_text(encoding='utf8') == 'custom' |
| 220 | |
| 221 | write_default_config(str(destination), overwrite=True) |
| 222 | assert '[main]' in destination.read_text(encoding='utf8') |
| 223 | |
| 224 | |
| 225 | def test_get_mylogin_cnf_path_returns_none_for_missing_file(monkeypatch, tmp_path) -> None: |
nothing calls this directly
no test coverage detected