diff --git a/kibot/gs.py b/kibot/gs.py index ab0783d6..91de3b6c 100644 --- a/kibot/gs.py +++ b/kibot/gs.py @@ -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): diff --git a/tests/.config/kiplot/plugins/fil_test.py b/tests/.config/kiplot/plugins/fil_test.py index 6095d785..76b517cb 100644 --- a/tests/.config/kiplot/plugins/fil_test.py +++ b/tests/.config/kiplot/plugins/fil_test.py @@ -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 diff --git a/tests/test_plot/test_misc_2.py b/tests/test_plot/test_misc_2.py index 8f3b5874..5a6f6ff6 100644 --- a/tests/test_plot/test_misc_2.py +++ b/tests/test_plot/test_misc_2.py @@ -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 "