From 6db1d6a304b55fd0e8ef5bd11d334fa2a0d482d1 Mon Sep 17 00:00:00 2001 From: Mikko Korpela Date: Sat, 20 Jan 2024 16:27:48 +0200 Subject: [PATCH] Importer --- src/pabot/pabotlib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pabot/pabotlib.py b/src/pabot/pabotlib.py index abc121d0..9c1a547c 100644 --- a/src/pabot/pabotlib.py +++ b/src/pabot/pabotlib.py @@ -31,7 +31,7 @@ from robot.api import logger from robot.libraries.BuiltIn import BuiltIn from robot.libraries.Remote import Remote -from robot.running import TestLibrary +from robot.utils.importer import Importer from .robotremoteserver import RobotRemoteServer @@ -157,7 +157,7 @@ def add_value_to_set(self, name, content): def import_shared_library(self, name, args=None): # type: (str, Iterable[Any]|None) -> int if name in self._remote_libraries: return self._remote_libraries[name][0] - imported = TestLibrary(name, args=args) + imported = Importer().import_class_or_module(name_or_path=name, instantiate_with_args=args) server = RobotRemoteServer( imported.get_instance(), port=0, serve=False, allow_stop=True )