Skip to content

Commit

Permalink
chore[tests]: Make bad tests more uniform
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem Vasenin committed Sep 23, 2020
1 parent 01ffe64 commit 010ec74
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion tests/data/bad.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from ntc import CN

from .base_cfg import cfg
from .good import cfg

cfg = CN(cfg)
cfg.NAME = 1
5 changes: 1 addition & 4 deletions tests/data/bad_attr.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
from ntc import CN

from .base_cfg import cfg
from .good import cfg

cfg = CN(cfg)

cfg.NAME = "bad_attr"

cfg.NEW = "bar"
5 changes: 1 addition & 4 deletions tests/data/bad_node.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
from ntc import CN

from .base_cfg import cfg
from .good import cfg


class BadClass:
pass


cfg = CN(cfg)

cfg.NAME = "bad_node"

cfg.CLASSES.ONE = BadClass()
3 changes: 1 addition & 2 deletions tests/data/bad_node_subclass.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
from ntc import CN

from .base_cfg import cfg
from .good import cfg


class BadSubClass:
pass


cfg = CN(cfg)
cfg.NAME = "bad_node"
cfg.SUBCLASSES.ONE = BadSubClass
2 changes: 1 addition & 1 deletion tests/data/bad_validate.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from ntc import CN

from .base_cfg import cfg
from .good import cfg

cfg = CN(cfg)
cfg.NAME = ""

0 comments on commit 010ec74

Please sign in to comment.