From 93504a984d747daabd58e48ef0b1ad2c3133b62e Mon Sep 17 00:00:00 2001 From: Xiaoqiang Wang Date: Fri, 22 Mar 2024 16:13:04 +0100 Subject: [PATCH] tests: explicit context create/destroy --- tests/test_sg.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_sg.py b/tests/test_sg.py index 0818afb..76c4603 100644 --- a/tests/test_sg.py +++ b/tests/test_sg.py @@ -6,6 +6,10 @@ def setup_module(module): pvs = {} vals = {} + # create context + status = ca.create_context(True) + assert status == ca.ECA.NORMAL + # create channels for name in ['cawaves', 'cawaveh', 'cawavef', 'cawavec', 'cawavel', 'cawave']: status, chid = ca.create_channel(name) @@ -69,3 +73,6 @@ def teardown_module(): pvs.clear() vals.clear() + + # destroy context + ca.destroy_context()