diff Tests/Toolbox.py @ 173:ed3db6386587

testing overwrite
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 19 Sep 2018 15:26:17 +0200
parents 0682740fcfcb
children d468cbe1b161
line wrap: on
line diff
--- a/Tests/Toolbox.py	Wed Sep 12 09:25:37 2018 +0200
+++ b/Tests/Toolbox.py	Wed Sep 19 15:26:17 2018 +0200
@@ -254,6 +254,19 @@
 
     return name
 
+def IsOrthancVersionAbove(orthanc, major, minor, revision):
+    v = DoGet(orthanc, '/system')['Version']
+
+    if v == 'mainline':
+        return True
+    else:
+        tmp = v.split('.')
+        a = int(tmp[0])
+        b = int(tmp[1])
+        c = int(tmp[2])
+        return (a > major or
+                (a == major and b > minor) or
+                (a == major and b == minor and c >= revision))
 
 
 class ExternalCommandThread: