IPy => ipaddress

This commit is contained in:
2019-02-24 11:53:30 +01:00
parent 715289a25a
commit 7c710d50b9
6 changed files with 73 additions and 64 deletions

View File

@ -52,10 +52,10 @@ def test_ip_reserved():
od = OptionDescription('od', '', [a, b, c])
warnings.simplefilter("always", ValueWarning)
cfg = Config(od)
raises(ValueError, "cfg.option('a').value.set('226.94.1.1')")
cfg.option('b').value.set('226.94.1.1')
raises(ValueError, "cfg.option('a').value.set('240.94.1.1')")
cfg.option('b').value.set('240.94.1.1')
with warnings.catch_warnings(record=True) as w:
cfg.option('c').value.set('226.94.1.1')
cfg.option('c').value.set('240.94.1.1')
assert len(w) == 1