Skip to content

Commit e6eeb75

Browse files
committedMar 29, 2024
fixed RF 7 rerunfailed, due to Variable moved from robot.running.model
Signed-off-by: Rene <snooz@posteo.de>
1 parent a5df582 commit e6eeb75

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed
 

‎src/DataDriver/DataDriver.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
warn,
5252
)
5353

54-
__version__ = "1.11.0"
54+
__version__ = "1.11.1"
5555

5656

5757
class DataDriver:

‎src/DataDriver/rerunfailed.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
from pathlib import Path
66

77
from robot.api import ExecutionResult, ResultVisitor, SuiteVisitor # type: ignore
8-
from robot.running.model import Variable # type: ignore
8+
try:
9+
from robot.running.model import Variable # type: ignore
10+
except ImportError:
11+
from robot.running.resourcemodel import Variable # type: ignore / robotframework>=7.0
912

1013

1114
class rerunfailed(SuiteVisitor):
@@ -23,7 +26,7 @@ def start_suite(self, suite):
2326
suite.tests.clear()
2427
return
2528
if self._suite_is_data_driven(suite):
26-
dynamic_tests = Variable("@{DYNAMICTESTS}", self._failed_tests, suite.source)
29+
dynamic_tests = Variable("${DYNAMICTESTS}", self._failed_tests, suite.source)
2730
suite.resource.variables.append(dynamic_tests)
2831
else:
2932
suite.tests = [

0 commit comments

Comments
 (0)