This commit is contained in:
2024-10-02 22:32:25 +03:00
parent 3f8df54bae
commit 488e62a9c3
3 changed files with 37 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
[pytest]
pythonpath =
src
testpaths =
tests
+10
View File
@@ -0,0 +1,10 @@
__author__ = 'RemiZOffAlex'
__email__ = 'remizoffalex@mail.ru'
import yaml
def yaml_read(filename):
with open(filename, 'r') as fd:
data = yaml.load(fd, Loader=yaml.Loader)
return data
+22
View File
@@ -0,0 +1,22 @@
import pytest
from configurator.config import Config
def config_dict():
return {
'kscfg': None,
'parent': {
'child': 1
}
}
def test_config():
config = Config(config_dict())
assert config.kscfg is None
def test_config_sub():
config = Config(config_dict())
assert config.parent.child == 1