예제 #1
0
 def _check_yaml(self, opt, save_yaml):
     """Make sure the given option may be set in autoconfig.yml."""
     if save_yaml and opt.no_autoconfig:
         raise configexc.NoAutoconfigError(opt.name)
예제 #2
0
 def _check_yaml(self, opt: 'configdata.Option', save_yaml: bool) -> None:
     """Make sure the given option may be set in autoconfig.yml."""
     if save_yaml and opt.no_autoconfig:
         raise configexc.NoAutoconfigError(opt.name)
예제 #3
0
def test_no_autoconfig_error():
    e = configexc.NoAutoconfigError('opt')
    expected = "The opt setting can only be set in config.py!"
    assert str(e) == expected