parent
f7ac5ef0c3
commit
80bed09889
@ -1,2 +1,2 @@
|
||||
from .specification import *
|
||||
from .manager import *
|
||||
from .specification import * # noqa
|
||||
from .manager import * # noqa
|
||||
|
||||
@ -1,2 +1,3 @@
|
||||
[pytest]
|
||||
pep8maxlinelength = 99
|
||||
addopts = --flake8
|
||||
flake8-max-line-length = 99
|
||||
@ -1,20 +0,0 @@
|
||||
import pytest
|
||||
import configspec
|
||||
from copy import deepcopy
|
||||
from test_configspec import example_spec, example_values
|
||||
|
||||
|
||||
def test_man(example_spec, example_values):
|
||||
confman = configspec.ConfigManager()
|
||||
confman.add_confspec("test_bundle", example_spec)
|
||||
confman.load({"test_bundle": example_values})
|
||||
assert confman.get_config_bundle("test_bundle") == example_values
|
||||
|
||||
confman.freeze_value("test_bundle", "int_a")
|
||||
newvals = deepcopy(example_values)
|
||||
newvals["int_a"] = 4
|
||||
|
||||
confman.load({"test_bundle": newvals})
|
||||
assert confman.get_config_bundle("test_bundle") == example_values
|
||||
confman.load_overlay({"test_bundle": {"string_a": "new text"}})
|
||||
assert confman.get_config_bundle("test_bundle")["string_a"] == "new text"
|
||||
Loading…
Reference in new issue