-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix crash with keyword decorator on class libraries
- Loading branch information
1 parent
047d385
commit 4059a68
Showing
5 changed files
with
76 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
tests/fixtures/test_robot/test_keyword_decorator_class_library/ClassLibrary.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# noqa: N999 | ||
# robot class libraries need to have the same name as the module | ||
from __future__ import annotations | ||
|
||
from robot.api import logger | ||
|
||
from pytest_robotframework import keyword | ||
|
||
|
||
class ClassLibrary: | ||
def __init__(self): | ||
pass | ||
|
||
@keyword | ||
def foo(self): # noqa: PLR6301 | ||
logger.info("hi") |
Empty file.
7 changes: 7 additions & 0 deletions
7
tests/fixtures/test_robot/test_keyword_decorator_class_library/asdf.robot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
*** Settings *** | ||
Library ./ClassLibrary.py | ||
|
||
|
||
*** Test Cases *** | ||
Asdf | ||
Foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters