From 3b165ef13fdc4886d9e760e15deaebb7dfd16c48 Mon Sep 17 00:00:00 2001 From: Vinicius Oliveira Date: Wed, 11 Mar 2026 14:50:34 -0300 Subject: [PATCH] refactor: implement shared driver and wait properties in Base class --- tir/technologies/core/base.py | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/tir/technologies/core/base.py b/tir/technologies/core/base.py index 2753f612..d1d5e196 100644 --- a/tir/technologies/core/base.py +++ b/tir/technologies/core/base.py @@ -59,10 +59,30 @@ class Base(unittest.TestCase): >>> def APWInternal(Base): """ - driver = None - wait = None + _shared_driver = None + _shared_wait = None errors = [] + @property + def driver(self): + """Property to always get the current shared driver instance""" + return Base._shared_driver + + @driver.setter + def driver(self, value): + """Property to update the shared driver for all instances""" + Base._shared_driver = value + + @property + def wait(self): + """Property to always get the current shared wait instance""" + return Base._shared_wait + + @wait.setter + def wait(self, value): + """Property to update the shared wait for all instances""" + Base._shared_wait = value + def __init__(self, config_path="", autostart=True): """ Definition of each global variable: