Modified the tests to cover the missing lines.

This commit is contained in:
Salvador E. Tropea 2021-02-04 13:40:14 -03:00
parent 2e780bd860
commit 0babc286af
3 changed files with 9 additions and 6 deletions

View File

@ -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):

View File

@ -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

View File

@ -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'>"