()
| 65 | |
| 66 | |
| 67 | def test_new() -> None: |
| 68 | # Touch file |
| 69 | open(CONFIG_FILENAME, 'w').close() |
| 70 | |
| 71 | config_write = Config(CONFIG_FILENAME) |
| 72 | assert config_write is not None |
| 73 | |
| 74 | config_write['core.bare'] = False |
| 75 | config_write['core.editor'] = 'ed' |
| 76 | |
| 77 | config_read = Config(CONFIG_FILENAME) |
| 78 | assert 'core.bare' in config_read |
| 79 | assert not config_read.get_bool('core.bare') |
| 80 | assert 'core.editor' in config_read |
| 81 | assert config_read['core.editor'] == 'ed' |
| 82 | |
| 83 | |
| 84 | def test_add() -> None: |