From 3f4ef9f2dea81f82bc3771ef04921e5148a1e158 Mon Sep 17 00:00:00 2001 From: Matthias Breuninger Date: Mon, 17 Feb 2025 12:04:55 +0100 Subject: [PATCH] tests: add test to enable all features Expects that all features are enabled due to the "*" input. Closes: https://github.com/CESNET/libyang-python/issues/101 Signed-off-by: Matthias Breuninger --- tests/test_context.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_context.py b/tests/test_context.py index 8a0412e..db03c32 100644 --- a/tests/test_context.py +++ b/tests/test_context.py @@ -63,6 +63,13 @@ def test_ctx_load_module(self): mod = ctx.load_module("yolo-system") self.assertIsInstance(mod, Module) + def test_ctx_load_module_with_features(self): + with Context(YANG_DIR) as ctx: + mod = ctx.load_module("yolo-system", None, ["*"]) + self.assertIsInstance(mod, Module) + for f in list(mod.features()): + self.assertTrue(f.state()) + def test_ctx_get_module(self): with Context(YANG_DIR) as ctx: ctx.load_module("yolo-system")