Skip to content

doc: improve documentaiton about listeters#183

Merged
aaltat merged 1 commit into
robotframework:mainfrom
aaltat:listner_doc
Jun 6, 2026
Merged

doc: improve documentaiton about listeters#183
aaltat merged 1 commit into
robotframework:mainfrom
aaltat:listner_doc

Conversation

@aaltat
Copy link
Copy Markdown
Contributor

@aaltat aaltat commented Jun 6, 2026

No description provided.

Copilot AI review requested due to automatic review settings June 6, 2026 20:30
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves PythonLibCore’s listener documentation and adds acceptance-test coverage demonstrating listener auto-detection in keyword component classes, while also tweaking CI Python version matrix formatting.

Changes:

  • Added a new README section describing listener support and an example implementation.
  • Added a new acceptance-test library (ListenerExample.py) and a new test case exercising listener behavior.
  • Updated acceptance test runner to execute the listener-focused suite and adjusted CI Python matrix version formatting.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
README.md Adds listener documentation and an example (needs wording/syntax-highlighting fixes).
atest/tests_listener.robot Imports the new listener example library and adds a new listener-related test case.
atest/run.py Runs the new listener acceptance-test suite and includes its output in the combined results.
atest/ListenerExample.py New acceptance-test library demonstrating a component class acting as a listener.
atest/ListenerCore.py Updates assertion error messages for listener-related acceptance tests.
.github/workflows/CI.yml Adjusts Python version matrix formatting (string versions / minor versions).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Comment on lines +161 to +165
PLC supports
[library listeners](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#libraries-as-listeners),
also listener can be defined in the class that defines keywords. PLC will automatically detect
is class is also listener and set the `ROBOT_LIBRARY_LISTENER` as a list. List will contains all
the class instances that are marked as listeners.
Comment thread README.md Outdated
the class instances that are marked as listeners.

Example:
```robotframework
Comment thread README.md Outdated
Comment on lines +204 to +205
In the example `KeywordsWithListener` will act as a listener and `start_test` method is
called each time test starts.
Copilot AI review requested due to automatic review settings June 6, 2026 20:37
@aaltat aaltat merged commit 005a127 into robotframework:main Jun 6, 2026
4 checks passed
@aaltat aaltat deleted the listner_doc branch June 6, 2026 20:38
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Comment thread README.md
Comment on lines +161 to +165
PLC supports
[library listeners](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#libraries-as-listeners),
also listener can be defined in the class that defines keywords. PLC will automatically detect
is class is also listener and set the `ROBOT_LIBRARY_LISTENER` as a list. List will contains all
the class instances that are marked as listeners.
Comment thread atest/ListenerExample.py
Comment on lines +9 to +15
ROBOT_LIBRARY_SCOPE = 'GLOBAL'
ROBOT_LISTENER_API_VERSION = 3

def __init__(self):
self.ROBOT_LIBRARY_LISTENER = self
components = [KeywordsWithListener()]
super().__init__(components)
Comment thread atest/ListenerExample.py
Comment on lines +22 to +24
def __init__(self):
self.test = None

Comment thread README.md
Comment on lines 213 to 216
is not mandatory to provide translation to all keyword.

The keys of the dictionary are the methods names, not the keyword names, which implements keyword.
The keys of the dictionary are the methods names, not the keyword names, which implements keyword.
Values are objects which contains two keys: `name` and `doc`. `name` key contains the keyword
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants