Skip to content

Commit ea81959

Browse files
committed
Make tests compatible with RF 4 and 5
1 parent 81e8251 commit ea81959

File tree

6 files changed

+7
-6
lines changed

6 files changed

+7
-6
lines changed

atest/robot/cli/rebot/help_and_version.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ Version
2525
Should Be Equal ${result.rc} ${251}
2626
Should Be Empty ${result.stderr}
2727
Should Match Regexp ${result.stdout}
28-
... ^Rebot 3\\.\\d(\\.\\d)?((a|b|rc)\\d)?(\\.dev\\d)? \\((Python|Jython|IronPython|PyPy) [23]\\.[\\d.]+.* on .+\\)$
28+
... ^Rebot [345]\\.\\d(\\.\\d)?((a|b|rc)\\d)?(\\.dev\\d)? \\((Python|Jython|IronPython|PyPy) [23]\\.[\\d.]+.* on .+\\)$
2929
Should Be True len($result.stdout) < 80 Too long version line

atest/robot/cli/runner/help_and_version.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ Version
3131
Should Be Equal ${result.rc} ${251}
3232
Should Be Empty ${result.stderr}
3333
Should Match Regexp ${result.stdout}
34-
... ^Robot Framework 3\\.\\d(\\.\\d)?((a|b|rc)\\d)?(\\.dev\\d)? \\((Python|Jython|IronPython|PyPy) [23]\\.[\\d.]+.* on .+\\)$
34+
... ^Robot Framework [345]\\.\\d(\\.\\d)?((a|b|rc)\\d)?(\\.dev\\d)? \\((Python|Jython|IronPython|PyPy) [23]\\.[\\d.]+.* on .+\\)$
3535
Should Be True len($result.stdout) < 80 Too long version line

atest/robot/libdoc/python_library.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Documentation
1313
... ``Telnet`` is Robot Framework's standard library that makes it possible to
1414

1515
Version
16-
Version Should Match 3.*
16+
Version Should Match [345].*
1717

1818
Type
1919
Type Should Be LIBRARY

atest/testdata/standard_libraries/builtin/evaluate.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Modules are imported automatically
3636
Should Be Equal ${sep} ${/}
3737
Should Be Equal ${+} \\+
3838
${version} = Evaluate robot.__version__.split('.')[0]
39-
Should Be Equal ${version} 3
39+
Should Be True ${version} in (3, 4, 5)
4040

4141
Importing non-existing module fails with NameError
4242
[Documentation] FAIL

atest/testdata/standard_libraries/builtin/should_be_true.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Should Not Be True with invalid expression
3737
Should (Not) Be True automatically imports modules
3838
Should Be True os.pathsep == '${:}'
3939
Should Be True math.pi > 3.14
40-
Should Be True robot.__version__[0] == '3'
40+
Should Be True robot.__version__[0] in ('3', '4', '5')
4141
Should Not Be True os.sep == 'os.sep'
4242
Should Not Be True sys.platform == 'hurd' # let's see when this starts failing
4343

atest/testdata/variables/python_evaluation.robot

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@ Inline variables
5454

5555
Automatic module import
5656
${{os.sep}} ${/}
57-
${{robot.__version__.split('.')[0]}} 3
5857
${{round(math.pi, 2)}} ${3.14}
5958
${{json.dumps([1, None, 'kolme'])}} [1, null, "kolme"]
59+
${{robot.__version__.split('.')[0] in ('3', '4', '5')}}
60+
... ${True}
6061

6162
Module imports are case-sensitive
6263
[Documentation] FAIL

0 commit comments

Comments
 (0)