Skip to content

Commit

Permalink
shared lib test
Browse files Browse the repository at this point in the history
  • Loading branch information
mkorpela committed Nov 29, 2024
1 parent d566f07 commit 70ca096
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_pabotlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from robot.errors import RobotError

from pabot import pabotlib
from pabot.SharedLibrary import SharedLibrary
from robot.running.context import EXECUTION_CONTEXTS
from robot.running.namespace import Namespace
from robot.running.model import TestSuite
Expand All @@ -23,6 +24,16 @@ def runned(*args):
pabotlib.BuiltIn = lambda: builtinmock
self.builtinmock = builtinmock

def test_shared_library_with_args(self):
try:
self._create_ctx() # Set up Robot Framework context
lib = SharedLibrary("Process", ["some_arg"])
self.assertIsNotNone(lib)
lib._remote = None
lib._lib.run_keyword("some_keyword", ["arg"], {})
except Exception as e:
self.fail(f"SharedLibrary initialization failed: {str(e)}")

def test_pabotlib_listener_path(self):
lib = pabotlib.PabotLib()
lib._start_suite("Suite", {"longname": "Suite"})
Expand Down

0 comments on commit 70ca096

Please sign in to comment.