summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/python-robotframework-atest.patch
blob: 619ed61b656da26422df0ab1b535c1ec063717c9 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Patch submitted upstream: https://github.com/robotframework/robotframework/pull/4286.

diff --git a/atest/robot/standard_libraries/operating_system/modified_time.robot b/atest/robot/standard_libraries/operating_system/modified_time.robot
index d144ffd34..c7681e61d 100644
--- a/atest/robot/standard_libraries/operating_system/modified_time.robot
+++ b/atest/robot/standard_libraries/operating_system/modified_time.robot
@@ -8,7 +8,7 @@ ${TESTFILE}       %{TEMPDIR}${/}robot-os-tests${/}f1.txt
 *** Test Cases ***
 Get Modified Time As Timestamp
     ${tc} =    Check Test Case    ${TESTNAME}
-    Should Match Regexp    ${tc.kws[0].msgs[0].message}    Last modified time of '<a href=.*</a>' is 20\\d\\d-\\d\\d-\\d\\d \\d\\d:\\d\\d:\\d\\d
+    Should Match Regexp    ${tc.kws[0].msgs[0].message}    Last modified time of '<a href=.*</a>' is \\d\\d\\d\\d-\\d\\d-\\d\\d \\d\\d:\\d\\d:\\d\\d
 
 Get Modified Time As Seconds After Epoch
     ${tc} =    Check Test Case    ${TESTNAME}
diff --git a/atest/testdata/standard_libraries/builtin/get_time.robot b/atest/testdata/standard_libraries/builtin/get_time.robot
index 9847d8c42..24ce732ca 100644
--- a/atest/testdata/standard_libraries/builtin/get_time.robot
+++ b/atest/testdata/standard_libraries/builtin/get_time.robot
@@ -11,18 +11,18 @@ Get Time As Timestamp
 
 Get Time As Seconds After Epoch
     ${time} =    Get Time    epoch
-    Should Be True    1000000000 < ${time} < 2000000000
+    Should Be True    0 < ${time}
 
 Get Time As Parts
     @{time} =    Get Time    year, month, day, hour, min, sec
-    Should Be True    2000 < ${time}[0] < 2100
+    Should Match Regexp    ${time}[0]    \\d{4}
     Should Be True    1 <= int('${time}[1]') <= 12
     Should Be True    1 <= int('${time}[2]') <= 31
     Should Be True    0 <= int('${time}[3]') <= 23
     Should Be True    0 <= int('${time}[4]') <= 59
     Should Be True    0 <= int('${time}[5]') <= 59
     ${year}    ${min}    ${sec} =    Get Time    seconds and minutes and year and whatnot
-    Should Be True    2000 < ${year} < 2100
+    Should Match Regexp    ${year}    \\d{4}
     Should Be True    0 <= int('${min}') <= 59
     Should Be True    0 <= int('${sec}') <= 59
 
diff --git a/atest/testdata/standard_libraries/operating_system/modified_time.robot b/atest/testdata/standard_libraries/operating_system/modified_time.robot
index 9489b3c9c..c712ebaed 100644
--- a/atest/testdata/standard_libraries/operating_system/modified_time.robot
+++ b/atest/testdata/standard_libraries/operating_system/modified_time.robot
@@ -14,13 +14,13 @@ Get Modified Time As Timestamp
 
 Get Modified Time As Seconds After Epoch
     ${dirtime} =    Get Modified Time    ${CURDIR}    epoch
-    Should Be True    1000000000 < ${dirtime} < 2000000000
+    Should Be True    ${dirtime} > 0
     ${current} =    Get Time    epoch
     Should Be True    ${current} >= ${dirtime}
 
 Get Modified Time As Parts
     ${year} =    Get Modified Time    ${CURDIR}    year
-    Should Be True    2000 < ${year} < 2100
+    Should Match Regexp    ${year}    \\d{4}
     ${yyyy}    ${mm}    ${dd} =    Get Modified Time    ${CURDIR}    year, month, day
     Should Be Equal    ${yyyy}    ${year}
     # Must use `int('x')` because otherwise 08 and 09 are considered octal