Modified the tests to cover the missing lines.
This commit is contained in:
parent
2e780bd860
commit
0babc286af
|
|
@ -70,6 +70,7 @@ class GS(object):
|
|||
global_output = None
|
||||
global_variant = None
|
||||
global_opts_class = None
|
||||
test_boolean = True
|
||||
|
||||
@staticmethod
|
||||
def set_sch(name):
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
from kibot.macros import macros, document, filter_class # noqa: F401
|
||||
from . import log
|
||||
from .gs import GS
|
||||
|
||||
logger = log.get_logger(__name__)
|
||||
|
||||
|
||||
with document:
|
||||
avar = 1
|
||||
avar = GS.debug_level
|
||||
""" Documentation """
|
||||
bvar = True
|
||||
bvar = GS.test_boolean
|
||||
""" Other doc """
|
||||
assert _help_avar == '[number=1] Documentation', _help_avar # noqa: F821
|
||||
assert _help_bvar == '[boolean=true] Other doc', _help_bvar # noqa: F821
|
||||
assert _help_avar == '[number=0] Documentation. Affected by global options', _help_avar # noqa: F821
|
||||
assert _help_bvar == '[boolean=true] Other doc. Affected by global options', _help_bvar # noqa: F821
|
||||
|
||||
|
||||
@filter_class
|
||||
|
|
|
|||
|
|
@ -225,7 +225,8 @@ def test_pre_xrc_fail(test_dir, caplog, monkeypatch):
|
|||
|
||||
|
||||
def test_unimplemented_layer(caplog):
|
||||
with pytest.raises(AssertionError) as e:
|
||||
Layer.solve(1)
|
||||
with context.cover_it(cov):
|
||||
with pytest.raises(AssertionError) as e:
|
||||
Layer.solve(1)
|
||||
assert e.type == AssertionError
|
||||
assert e.value.args[0] == "Unimplemented layer type <class 'int'>"
|
||||
|
|
|
|||
Loading…
Reference in New Issue