How to use the configupdater.ParsingError function in ConfigUpdater

To help you get started, we’ve selected a few ConfigUpdater examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pyscaffold / configupdater / tests / test_configupdater.py View on Github external
def test_validate_format(setup_cfg_path):
    updater = ConfigUpdater(allow_no_value=False)
    updater.read(setup_cfg_path)
    updater.validate_format()
    updater.set('metadata', 'author')
    with pytest.raises(ParsingError):
        updater.validate_format()
github pyscaffold / configupdater / tests / test_configupdater.py View on Github external
def test_handle_error():
    updater = ConfigUpdater(allow_no_value=False)
    with pytest.raises(ParsingError):
        updater.read_string(test_wrong_cfg)