Skip to content

Commit

Permalink
test(description): change configs structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Mikhaylov committed Dec 15, 2020
1 parent 0f4a9e7 commit acd60c3
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 11 deletions.
1 change: 0 additions & 1 deletion tests/data/base_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
cfg.CLASSES = CN(BaseClass)
cfg.SUBCLASS = BaseClass
cfg.SUBCLASSES = CN(CL(None, BaseClass, subclass=True))
cfg.DESCRIBED = CL("described", desc="Described leaf")


def transform(cfg: CN):
Expand Down
2 changes: 1 addition & 1 deletion tests/data/description/description.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ntc import CN
from tests.data.base_cfg import cfg
from tests.data.description.base import cfg

cfg = CN(cfg)
3 changes: 2 additions & 1 deletion tests/data/description/description_bad.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from ntc import CN
from tests.data.base_cfg import cfg
from tests.data.description.base import cfg

cfg = CN(cfg)

cfg.DESCRIBED = 1
7 changes: 0 additions & 7 deletions tests/data/description/description_inheritance.py

This file was deleted.

2 changes: 1 addition & 1 deletion tests/test_description.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def test_description():


def test_description_inheritance():
cfg = CN.load(DATA_DIR / "description_inheritance.py")
cfg = CN.load(DATA_DIR / "description_overriding.py")

assert cfg.describe() == "Root config node"
assert cfg.DESCRIBED == "overrided"
Expand Down

0 comments on commit acd60c3

Please sign in to comment.