Skip to content

Commit

Permalink
feat: support robotframework 7.0 (#75)
Browse files Browse the repository at this point in the history
* feat: support robotframework 7.0

* doc: update test badge image url
  • Loading branch information
xyb authored Jan 12, 2024
1 parent e933695 commit 18f60b7
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", 3.11, 3.12]
robotframework-version: [4.1, 5.0, 6.1]
python-version: [3.8, 3.9, "3.10", 3.11, 3.12]
robotframework-version: [4.1, 5.0, 6.1, 7.0]
platform: [ubuntu-latest, macOS-latest]
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion DebugLibrary/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
TEST_SUITE = b'''*** Settings ***
Library DebugLibrary
** test case **
** test cases **
RFDEBUG REPL
debug
'''
Expand Down
8 changes: 8 additions & 0 deletions DebugLibrary/steplistener.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@ def _start_keyword(self, name, attrs):
find_runner_step()
step = context.current_runner_step

path = ''
if hasattr(step, 'lineno'):
path = step.source
lineno = step.lineno
elif 'lineno' in attrs:
path = attrs['source']
lineno = attrs['lineno']

if path:
lineno_0_based = lineno - 1
context.current_source_path = path
context.current_source_lineno = lineno
Expand All @@ -42,6 +48,8 @@ def _start_keyword(self, name, attrs):
# callback debug interface
self.debug()

start_keyword = _start_keyword


# Hack to find the current runner Step to get the source path and line number.
# This method relies on the internal implementation logic of RF and may need
Expand Down
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ which can be used as an interactive shell(REPL) also.
:target: https://codeclimate.com/github/xyb/robotframework-debuglibrary/test_coverage
:alt: Test Coverage

.. image:: https://github.com/xyb/robotframework-debuglibrary/workflows/test/badge.svg?branch=master
:target: https://github.com/xyb/robotframework-debuglibrary
.. image:: https://github.com/xyb/robotframework-debuglibrary/actions/workflows/test.yml/badge.svg
:target: https://github.com/xyb/robotframework-debuglibrary/actions/workflows/test.yml
:alt: test

.. image:: https://img.shields.io/pypi/v/robotframework-debuglibrary.svg
:target: https://pypi.org/project/robotframework-debuglibrary/
:alt: Latest version

.. image:: https://img.shields.io/badge/robotframework-4%20%7C%205%20%7C%206-blue
.. image:: https://img.shields.io/badge/robotframework-4%20%7C%205%20%7C%206%20%7C%207-blue
:target: https://github.com/xyb/robotframework-debuglibrary
:alt: Support robotframework versions

Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ def find_version(*file_paths):
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
Expand Down
2 changes: 1 addition & 1 deletion tests/step.robot
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
*** Settings ***
Library DebugLibrary

** test case **
** test cases **
test1
debug
log to console working
Expand Down

0 comments on commit 18f60b7

Please sign in to comment.