Skip to content

Commit

Permalink
fixed RF 7 rerunfailed, due to Variable moved from robot.running.model
Browse files Browse the repository at this point in the history
Signed-off-by: Rene <snooz@posteo.de>
  • Loading branch information
Snooz82 committed Mar 29, 2024
1 parent a5df582 commit e6eeb75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/DataDriver/DataDriver.py
Expand Up @@ -51,7 +51,7 @@
warn,
)

__version__ = "1.11.0"
__version__ = "1.11.1"


class DataDriver:
Expand Down
7 changes: 5 additions & 2 deletions src/DataDriver/rerunfailed.py
Expand Up @@ -5,7 +5,10 @@
from pathlib import Path

from robot.api import ExecutionResult, ResultVisitor, SuiteVisitor # type: ignore
from robot.running.model import Variable # type: ignore
try:
from robot.running.model import Variable # type: ignore
except ImportError:
from robot.running.resourcemodel import Variable # type: ignore / robotframework>=7.0


class rerunfailed(SuiteVisitor):
Expand All @@ -23,7 +26,7 @@ def start_suite(self, suite):
suite.tests.clear()
return
if self._suite_is_data_driven(suite):
dynamic_tests = Variable("@{DYNAMICTESTS}", self._failed_tests, suite.source)
dynamic_tests = Variable("${DYNAMICTESTS}", self._failed_tests, suite.source)
suite.resource.variables.append(dynamic_tests)
else:
suite.tests = [
Expand Down

0 comments on commit e6eeb75

Please sign in to comment.