diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4e0c63c..e2f7d02 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/DebugLibrary/shell.py b/DebugLibrary/shell.py index 08b60d9..e300a31 100644 --- a/DebugLibrary/shell.py +++ b/DebugLibrary/shell.py @@ -7,7 +7,7 @@ TEST_SUITE = b'''*** Settings *** Library DebugLibrary -** test case ** +** test cases ** RFDEBUG REPL debug ''' diff --git a/DebugLibrary/steplistener.py b/DebugLibrary/steplistener.py index 65cdea1..7d803ca 100644 --- a/DebugLibrary/steplistener.py +++ b/DebugLibrary/steplistener.py @@ -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 @@ -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 diff --git a/README.rst b/README.rst index 2d60bd8..2c69c84 100644 --- a/README.rst +++ b/README.rst @@ -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 diff --git a/setup.py b/setup.py index 37b2558..92624cd 100755 --- a/setup.py +++ b/setup.py @@ -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', diff --git a/tests/step.robot b/tests/step.robot index 1c4dfe4..c2181c8 100644 --- a/tests/step.robot +++ b/tests/step.robot @@ -1,7 +1,7 @@ *** Settings *** Library DebugLibrary -** test case ** +** test cases ** test1 debug log to console working