robotframework-robotlibrary 1.0a2__tar.gz → 1.0a3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/PKG-INFO +1 -1
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/src/RobotLibrary/__init__.py +4 -1
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/src/RobotLibrary/_listener.py +13 -2
- robotframework_robotlibrary-1.0a3/src/RobotLibrary/_version.py +1 -0
- robotframework_robotlibrary-1.0a3/tests/examples/library_imports_example.robot +11 -0
- robotframework_robotlibrary-1.0a3/tests/test_library_imports.robot +8 -0
- robotframework_robotlibrary-1.0a2/src/RobotLibrary/_version.py +0 -1
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/.gitignore +0 -0
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/LICENSE +0 -0
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/README.md +0 -0
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/pyproject.toml +0 -0
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/tests/README.md +0 -0
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/tests/examples/README.md +0 -0
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/tests/examples/control_structures_example.robot +0 -0
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/tests/examples/keywords.resource +0 -0
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/tests/examples/login_example.robot +0 -0
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/tests/examples/resource_imports_example.robot +0 -0
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/tests/examples/setup_teardown_example.robot +0 -0
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/tests/examples/simple_task.robot +0 -0
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/tests/examples/suite_fixtures_example.robot +0 -0
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/tests/examples/task_suite_fixtures.robot +0 -0
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/tests/examples/task_with_fixtures.robot +0 -0
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/tests/examples/task_with_logic.robot +0 -0
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/tests/examples/variables_example.robot +0 -0
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/tests/test_basic_injection.robot +0 -0
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/tests/test_control_structures.robot +0 -0
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/tests/test_fixtures.robot +0 -0
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/tests/test_resource_imports.robot +0 -0
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/tests/test_suite_level_fixtures.robot +0 -0
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/tests/test_task_injection.robot +0 -0
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/tests/test_template_injection.robot +0 -0
- {robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/tests/test_variables.robot +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: robotframework-robotlibrary
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.0a3
|
|
4
4
|
Summary: Robot Framework library for testing Robot Framework tests and tasks within Robot Framework itself.
|
|
5
5
|
Project-URL: Homepage, https://github.com/datakurre/robotframework-robotlibrary
|
|
6
6
|
Project-URL: Repository, https://github.com/datakurre/robotframework-robotlibrary
|
{robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/src/RobotLibrary/__init__.py
RENAMED
|
@@ -254,7 +254,7 @@ class RobotLibrary(RobotLibraryListener):
|
|
|
254
254
|
if not target_test:
|
|
255
255
|
raise RuntimeError(f"Test or task '{test_name}' not found in {suite_path}")
|
|
256
256
|
|
|
257
|
-
# -- Import resource files from the target suite --
|
|
257
|
+
# -- Import resource files and libraries from the target suite --
|
|
258
258
|
suite_dir = Path(str(suite.source)).parent if suite.source else None
|
|
259
259
|
if hasattr(suite, "resource") and hasattr(suite.resource, "imports"):
|
|
260
260
|
for imp in suite.resource.imports:
|
|
@@ -263,6 +263,9 @@ class RobotLibrary(RobotLibraryListener):
|
|
|
263
263
|
if suite_dir and not Path(imp_path).is_absolute():
|
|
264
264
|
imp_path = str(suite_dir / imp_path)
|
|
265
265
|
builtin.import_resource(imp_path)
|
|
266
|
+
elif imp.type == "LIBRARY":
|
|
267
|
+
lib_args = list(imp.args) if imp.args else []
|
|
268
|
+
builtin.import_library(imp.name, *lib_args)
|
|
266
269
|
|
|
267
270
|
# -- Inject variables from the target suite's variable table --
|
|
268
271
|
if hasattr(suite, "resource") and hasattr(suite.resource, "variables"):
|
|
@@ -162,8 +162,9 @@ class RobotLibraryListener:
|
|
|
162
162
|
self._create_set_variable_keyword(var_name, var_value)
|
|
163
163
|
)
|
|
164
164
|
|
|
165
|
-
# Build resource import steps so that keywords from the
|
|
166
|
-
# suite's resource files are available in the
|
|
165
|
+
# Build resource and library import steps so that keywords from the
|
|
166
|
+
# target suite's resource files and libraries are available in the
|
|
167
|
+
# calling test's scope.
|
|
167
168
|
import_steps = []
|
|
168
169
|
if hasattr(suite, "resource") and hasattr(suite.resource, "imports"):
|
|
169
170
|
from pathlib import Path
|
|
@@ -182,6 +183,16 @@ class RobotLibraryListener:
|
|
|
182
183
|
args=[imp_path],
|
|
183
184
|
)
|
|
184
185
|
)
|
|
186
|
+
elif imp.type == "LIBRARY":
|
|
187
|
+
lib_args = [imp.name]
|
|
188
|
+
if imp.args:
|
|
189
|
+
lib_args.extend(imp.args)
|
|
190
|
+
import_steps.append(
|
|
191
|
+
RunningKeyword(
|
|
192
|
+
name="BuiltIn.Import Library",
|
|
193
|
+
args=lib_args,
|
|
194
|
+
)
|
|
195
|
+
)
|
|
185
196
|
|
|
186
197
|
# Collect setup / teardown steps from the target test.
|
|
187
198
|
# These are injected as regular body steps (first / last) rather
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.0a3"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
*** Settings ***
|
|
2
|
+
Documentation Example suite that imports a Python library.
|
|
3
|
+
... Demonstrates that RobotLibrary auto-imports Library statements
|
|
4
|
+
... so that keywords from the library are available during injection.
|
|
5
|
+
Library random
|
|
6
|
+
|
|
7
|
+
*** Test Cases ***
|
|
8
|
+
Test Randint
|
|
9
|
+
${result}= Randint ${1} ${10}
|
|
10
|
+
Should Be True ${result} >= ${1}
|
|
11
|
+
Should Be True ${result} <= ${10}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
*** Settings ***
|
|
2
|
+
Documentation Meta-tests for library imports and keyword availability.
|
|
3
|
+
Library RobotLibrary
|
|
4
|
+
|
|
5
|
+
*** Test Cases ***
|
|
6
|
+
Test Library Keyword Injection
|
|
7
|
+
[Documentation] Verify that keywords from imported libraries are available.
|
|
8
|
+
Run Robot Test ${CURDIR}/examples/library_imports_example.robot Test Randint
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.0a2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/tests/examples/README.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/tests/test_fixtures.robot
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{robotframework_robotlibrary-1.0a2 → robotframework_robotlibrary-1.0a3}/tests/test_variables.robot
RENAMED
|
File without changes
|