TestCenter Reference
Macros.py
Go to the documentation of this file.
1 #
2 # Copyright 2009, MeVis Medical Solutions AG
3 #
4 # The user may use this file in accordance with the license agreement provided with
5 # the Software or, alternatively, in accordance with the terms contained in a
6 # written agreement between the user and MeVis Medical Solutions AG.
7 #
8 # For further information use the contact form at https://www.mevislab.de/contact
9 #
10 
11 from builtins import str
12 
13 # Already ported to Python 3
14 
30 
31 # -- system imports ----------------------------------------------------------------------------{{{-
32 # ----------------------------------------------------------------------------------------------}}}-
33 
34 # -- local imports -----------------------------------------------------------------------------{{{-
35 import os
36 
37 import sys
38 
39 from TestSupport.TestHelper import TestHelper, UseStackFrameFromCallerForLogging, CancelTestException
40 
41 # ----------------------------------------------------------------------------------------------}}}-
42 
43 # -- class AssertException ---------------------------------------------------------------------{{{-
44 # @cond
45 
46 class AssertException (Exception):
47  # -- def __init__ ----------------------------------------------------------------------------{{{-
48  def __init__ (self, reason):
49  self.__reason = reason
50  # --------------------------------------------------------------------------------------------}}}-
51 
52  # -- def getReason ---------------------------------------------------------------------------{{{-
53  def getReason (self):
54  return repr(self.__reason)
55  # --------------------------------------------------------------------------------------------}}}-
56 
57  # -- def __str__ -----------------------------------------------------------------------------{{{-
58  def __str__ (self):
59  return repr(self.__reason)
60  # --------------------------------------------------------------------------------------------}}}-
61 # @endcond
62 # ----------------------------------------------------------------------------------------------}}}-
63 
64 # -- def ASSERT_TRUE ---------------------------------------------------------------------------{{{-
65 
69 @UseStackFrameFromCallerForLogging
70 def ASSERT_TRUE (expr, msg=None, logOnSuccess=None):
71  if not Base_verifyTrue(expr, comment = msg, logOnSuccess = logOnSuccess):
72  raise AssertException("Expression does not evaluate to true.")
73 # ----------------------------------------------------------------------------------------------}}}-
74 
75 # -- def EXPECT_TRUE ---------------------------------------------------------------------------{{{-
76 
81 @UseStackFrameFromCallerForLogging
82 def EXPECT_TRUE (expr, msg=None, logOnSuccess=None):
83  return Base_verifyTrue(expr, comment = msg, logOnSuccess = logOnSuccess)
84 
85 # ----------------------------------------------------------------------------------------------}}}-
86 
87 # -- def ASSERT_FALSE --------------------------------------------------------------------------{{{-
88 
92 @UseStackFrameFromCallerForLogging
93 def ASSERT_FALSE (expr, msg=None, logOnSuccess=None):
94  if not Base_verifyFalse(expr, comment = msg, logOnSuccess = logOnSuccess):
95  raise AssertException("Expression does not evaluate to false.")
96 
97 # ----------------------------------------------------------------------------------------------}}}-
98 
99 # -- def EXPECT_FALSE --------------------------------------------------------------------------{{{-
100 
105 @UseStackFrameFromCallerForLogging
106 def EXPECT_FALSE (expr, msg=None, logOnSuccess=None):
107  return Base_verifyFalse(expr, comment = msg, logOnSuccess = logOnSuccess)
108 # ----------------------------------------------------------------------------------------------}}}-
109 
110 # -- def ASSERT_EQ -----------------------------------------------------------------------------{{{-
111 
116 @UseStackFrameFromCallerForLogging
117 def ASSERT_EQ (expected, actual, msg=None, logOnSuccess=None):
118  if not Base_compareEqual(expected, actual, comment = msg, logOnSuccess = logOnSuccess):
119  raise AssertException("Values (%s and %s) are not equal." % (str(expected), str(actual)))
120 # ----------------------------------------------------------------------------------------------}}}-
121 
122 # -- def EXPECT_EQ -----------------------------------------------------------------------------{{{-
123 
129 @UseStackFrameFromCallerForLogging
130 def EXPECT_EQ (expected, actual, msg=None, logOnSuccess=None):
131  return Base_compareEqual(expected, actual, comment = msg, logOnSuccess = logOnSuccess)
132 # ----------------------------------------------------------------------------------------------}}}-
133 
134 # -- def ASSERT_NE -----------------------------------------------------------------------------{{{-
135 
140 @UseStackFrameFromCallerForLogging
141 def ASSERT_NE (expected, actual, msg=None, logOnSuccess=None):
142  if not Base_compareNotEqual(expected, actual, comment = msg, logOnSuccess = logOnSuccess):
143  raise AssertException("Values (%s and %s) are equal." % (str(expected), str(actual)))
144 # ----------------------------------------------------------------------------------------------}}}-
145 
146 # -- def EXPECT_NE -----------------------------------------------------------------------------{{{-
147 
153 @UseStackFrameFromCallerForLogging
154 def EXPECT_NE (expected, actual, msg=None, logOnSuccess=None):
155  return Base_compareNotEqual(expected, actual, comment = msg, logOnSuccess = logOnSuccess)
156 # ----------------------------------------------------------------------------------------------}}}-
157 
158 # -- def ASSERT_GT -----------------------------------------------------------------------------{{{-
159 
165 @UseStackFrameFromCallerForLogging
166 def ASSERT_GT (a, b, msg=None, logOnSuccess=None):
167  if not Base_compareLessThan(b, a, comment = msg, logOnSuccess = logOnSuccess):
168  raise AssertException("Value %s not greater than %s." % (str(a), str(b)))
169 # ----------------------------------------------------------------------------------------------}}}-
170 
171 # -- def EXPECT_GT -----------------------------------------------------------------------------{{{-
172 
178 @UseStackFrameFromCallerForLogging
179 def EXPECT_GT (a, b, msg=None, logOnSuccess=None):
180  return Base_compareLessThan(b, a, comment = msg, logOnSuccess = logOnSuccess)
181 # ----------------------------------------------------------------------------------------------}}}-
182 
183 # -- def ASSERT_GE -----------------------------------------------------------------------------{{{-
184 
189 @UseStackFrameFromCallerForLogging
190 def ASSERT_GE (a, b, msg=None, logOnSuccess=None):
191  if not Base_compareLessThanOrEqual(b, a, comment = msg, logOnSuccess = logOnSuccess):
192  raise AssertException("Value %s not greater than or equal to %s." % (str(a), str(b)))
193 # ----------------------------------------------------------------------------------------------}}}-
194 
195 # -- def EXPECT_GE -----------------------------------------------------------------------------{{{-
196 
202 @UseStackFrameFromCallerForLogging
203 def EXPECT_GE (a, b, msg=None, logOnSuccess=None):
204  return Base_compareLessThanOrEqual(b, a, comment = msg, logOnSuccess = logOnSuccess)
205 # ----------------------------------------------------------------------------------------------}}}-
206 
207 # -- def ASSERT_LT -----------------------------------------------------------------------------{{{-
208 
213 @UseStackFrameFromCallerForLogging
214 def ASSERT_LT (a, b, msg=None, logOnSuccess=None):
215  if not Base_compareLessThan(a, b, comment = msg, logOnSuccess = logOnSuccess):
216  raise AssertException("Value %s not less than %s." % (str(a), str(b)))
217 # ----------------------------------------------------------------------------------------------}}}-
218 
219 # -- def EXPECT_LT -----------------------------------------------------------------------------{{{-
220 
226 @UseStackFrameFromCallerForLogging
227 def EXPECT_LT (a, b, msg=None, logOnSuccess=None):
228  return Base_compareLessThan(a, b, comment = msg, logOnSuccess = logOnSuccess)
229 # ----------------------------------------------------------------------------------------------}}}-
230 
231 # -- def ASSERT_LE -----------------------------------------------------------------------------{{{-
232 
237 @UseStackFrameFromCallerForLogging
238 def ASSERT_LE (a, b, msg=None, logOnSuccess=None):
239  if not Base_compareLessThanOrEqual(a, b, comment = msg, logOnSuccess = logOnSuccess):
240  raise AssertException("Value %s not less than or equal to %s." % (str(a), str(b)))
241 # ----------------------------------------------------------------------------------------------}}}-
242 
243 # -- def EXPECT_LE -----------------------------------------------------------------------------{{{-
244 
250 @UseStackFrameFromCallerForLogging
251 def EXPECT_LE (a, b, msg=None, logOnSuccess=None):
252  return Base_compareLessThanOrEqual(a, b, comment = msg, logOnSuccess = logOnSuccess)
253 # ----------------------------------------------------------------------------------------------}}}-
254 
255 # -- def ASSERT_FLOAT_EQ -----------------------------------------------------------------------{{{-
256 
262 @UseStackFrameFromCallerForLogging
263 def ASSERT_FLOAT_EQ (expected, actual, msg=None, epsilon=0.0001, logOnSuccess=None):
264  if not Base_compareFloatEqual(expected, actual, msg, epsilon, logOnSuccess):
265  raise AssertException("Values (%s and %s) not equal." % (str(expected), str(actual)))
266 # ----------------------------------------------------------------------------------------------}}}-
267 
268 # -- def EXPECT_FLOAT_EQ -----------------------------------------------------------------------{{{-
269 
276 @UseStackFrameFromCallerForLogging
277 def EXPECT_FLOAT_EQ (expected, actual, msg=None, epsilon=0.0001, logOnSuccess=None):
278  return Base_compareFloatEqual(expected, actual, msg, epsilon, logOnSuccess)
279 # ----------------------------------------------------------------------------------------------}}}-
280 
281 # -- def ASSERT_FLOAT_NE -----------------------------------------------------------------------{{{-
282 
288 @UseStackFrameFromCallerForLogging
289 def ASSERT_FLOAT_NE (expected, actual, msg=None, epsilon=0.0001, logOnSuccess=None):
290  if not Base_compareFloatNotEqual(expected, actual, msg, epsilon, logOnSuccess):
291  raise AssertException("Values (%s and %s) equal." % (str(expected), str(actual)))
292 # ----------------------------------------------------------------------------------------------}}}-
293 
294 # -- def EXPECT_FLOAT_NE -----------------------------------------------------------------------{{{-
295 
302 @UseStackFrameFromCallerForLogging
303 def EXPECT_FLOAT_NE (expected, actual, msg=None, epsilon=0.0001, logOnSuccess=None):
304  return Base_compareFloatNotEqual(expected, actual, msg, epsilon, logOnSuccess)
305 # ----------------------------------------------------------------------------------------------}}}-
306 
307 # -- def ASSERT_FLOAT_GT -----------------------------------------------------------------------{{{-
308 
313 @UseStackFrameFromCallerForLogging
314 def ASSERT_FLOAT_GT (a, b, msg=None, logOnSuccess=None):
315  if not Base_compareFloatLessThan(b, a, comment = msg, logOnSuccess = logOnSuccess):
316  raise AssertException("Value %s not greater than %s." % (str(a), str(b)))
317 # ----------------------------------------------------------------------------------------------}}}-
318 
319 # -- def EXPECT_FLOAT_GT -----------------------------------------------------------------------{{{-
320 
326 @UseStackFrameFromCallerForLogging
327 def EXPECT_FLOAT_GT (a, b, msg=None, logOnSuccess=None):
328  return Base_compareFloatLessThan(b, a, comment = msg, logOnSuccess = logOnSuccess)
329 # ----------------------------------------------------------------------------------------------}}}-
330 
331 # -- def ASSERT_FLOAT_GE -----------------------------------------------------------------------{{{-
332 
338 @UseStackFrameFromCallerForLogging
339 def ASSERT_FLOAT_GE (a, b, msg=None, epsilon=0.0001, logOnSuccess=None):
340  if not Base_compareFloatLessThanOrEqual(b, a, msg, epsilon, logOnSuccess):
341  raise AssertException("Value %s not greater than or equal to %s." % (str(a), str(b)))
342 # ----------------------------------------------------------------------------------------------}}}-
343 
344 # -- def EXPECT_FLOAT_GE -----------------------------------------------------------------------{{{-
345 
352 @UseStackFrameFromCallerForLogging
353 def EXPECT_FLOAT_GE (a, b, msg=None, epsilon=0.0001, logOnSuccess=None):
354  return Base_compareFloatLessThanOrEqual(b, a, msg, epsilon, logOnSuccess)
355 # ----------------------------------------------------------------------------------------------}}}-
356 
357 # -- def ASSERT_FLOAT_LT -----------------------------------------------------------------------{{{-
358 
363 @UseStackFrameFromCallerForLogging
364 def ASSERT_FLOAT_LT (a, b, msg=None, logOnSuccess=None):
365  if not Base_compareFloatLessThan(a, b, comment = msg, logOnSuccess = logOnSuccess):
366  raise AssertException("Value %s not less than %s." % (str(a), str(b)))
367 # ----------------------------------------------------------------------------------------------}}}-
368 
369 # -- def EXPECT_FLOAT_LT -----------------------------------------------------------------------{{{-
370 
376 @UseStackFrameFromCallerForLogging
377 def EXPECT_FLOAT_LT (a, b, msg=None, logOnSuccess=None):
378  return Base_compareFloatLessThan(a, b, comment = msg, logOnSuccess = logOnSuccess)
379 # ----------------------------------------------------------------------------------------------}}}-
380 
381 # -- def ASSERT_FLOAT_LE -----------------------------------------------------------------------{{{-
382 
388 @UseStackFrameFromCallerForLogging
389 def ASSERT_FLOAT_LE (a, b, msg=None, epsilon=0.0001, logOnSuccess=None):
390  if not Base_compareFloatLessThanOrEqual(a, b, msg, epsilon, logOnSuccess):
391  raise AssertException("Value %s not less than or equal to %s." % (str(a), str(b)))
392 # ----------------------------------------------------------------------------------------------}}}-
393 
394 # -- def EXPECT_FLOAT_LE -----------------------------------------------------------------------{{{-
395 
402 @UseStackFrameFromCallerForLogging
403 def EXPECT_FLOAT_LE (a, b, msg=None, epsilon=0.0001, logOnSuccess=None):
404  return Base_compareFloatLessThanOrEqual(a, b, msg, epsilon, logOnSuccess)
405 # ----------------------------------------------------------------------------------------------}}}-
406 
407 # -- def EXPECT_EMPTY -----------------------------------------------------------------------{{{-
408 
413 @UseStackFrameFromCallerForLogging
414 def EXPECT_EMPTY ( a, msg=None, logOnSuccess=None):
415  return Base_compareEqual( 0, len( a ), comment = msg, logOnSuccess = logOnSuccess )
416 
417 # -- def ASSERT_EMPTY -----------------------------------------------------------------------{{{-
418 
422 @UseStackFrameFromCallerForLogging
423 def ASSERT_EMPTY ( a, msg=None, logOnSuccess=None):
424  if not Base_compareEqual( 0, len( a ), comment = msg, logOnSuccess = logOnSuccess ):
425  raise AssertException( "Container %s is not empty." % (str(a)) )
426 
427 # -- def EXPECT_NOT_EMPTY -----------------------------------------------------------------------{{{-
428 
433 @UseStackFrameFromCallerForLogging
434 def EXPECT_NOT_EMPTY ( a, msg=None, logOnSuccess=None):
435  return Base_compareLessThan( 0, len( a ), comment = msg, logOnSuccess = logOnSuccess )
436 
437 # -- def ASSERT_NOT_EMPTY -----------------------------------------------------------------------{{{-
438 
442 @UseStackFrameFromCallerForLogging
443 def ASSERT_NOT_EMPTY ( a, msg=None, logOnSuccess=None):
444  if not Base_compareLessThan( 0, len( a ), comment = msg, logOnSuccess = logOnSuccess ):
445  raise AssertException( "Container %s is empty." % (str(a)) )
446 
447 # -- def EXPECT_SIZE -----------------------------------------------------------------------{{{-
448 
454 @UseStackFrameFromCallerForLogging
455 def EXPECT_SIZE ( a, size, msg=None, logOnSuccess=None):
456  return Base_compareEqual( size, len( a ), comment = msg, logOnSuccess = logOnSuccess )
457 
458 # -- def ASSERT_SIZE -----------------------------------------------------------------------{{{-
459 
464 @UseStackFrameFromCallerForLogging
465 def ASSERT_SIZE ( a, size, msg=None, logOnSuccess=None):
466  if not Base_compareEqual( size, len( a ), comment = msg, logOnSuccess = logOnSuccess ):
467  raise AssertException( "Container %s size is not %s." % (str(a), str(size)) )
468 
469 # -- def EXPECT_PATH_EXISTS -----------------------------------------------------------------------{{{-
470 
474 @UseStackFrameFromCallerForLogging
475 def EXPECT_PATH_EXISTS(path, msg=None, logOnSuccess=None):
476  contextMsg = "Path = %s" % path
477  return Base_verifyTrue(os.path.exists(path), comment = msg, msg=contextMsg, logOnSuccess = logOnSuccess)
478 
479 # -- def EXPECT_PATH_MISSING -----------------------------------------------------------------------{{{-
480 
484 @UseStackFrameFromCallerForLogging
485 def EXPECT_PATH_MISSING(path, msg=None, logOnSuccess=None):
486  contextMsg = "Path = %s" % path
487  return Base_verifyFalse(os.path.exists(path), comment = msg, msg=contextMsg, logOnSuccess = logOnSuccess)
488 
489 # -- def ASSERT_PATH_EXISTS -----------------------------------------------------------------------{{{-
490 
494 @UseStackFrameFromCallerForLogging
495 def ASSERT_PATH_EXISTS(path, msg=None, logOnSuccess=None):
496  contextMsg = "Path = %s" % path
497  if not Base_verifyTrue(os.path.exists(path), comment = msg, msg=contextMsg, logOnSuccess = logOnSuccess):
498  raise AssertException("Path does not exist: %s" % path)
499 
500 # -- def ASSERT_PATH_MISSING -----------------------------------------------------------------------{{{-
501 
505 @UseStackFrameFromCallerForLogging
506 def ASSERT_PATH_MISSING(path, msg=None, logOnSuccess=None):
507  contextMsg = "Path = %s" % path
508  if not Base_verifyFalse(os.path.exists(path), comment = msg, msg=contextMsg, logOnSuccess = logOnSuccess):
509  raise AssertException("Path exists: %s" % path)
510 
511 # -- def INFO ----------------------------------------------------------------------------------{{{-
512 
513 @UseStackFrameFromCallerForLogging
514 def INFO (msg):
515  Logging_info(msg, depth=1)
516 # ----------------------------------------------------------------------------------------------}}}-
517 
518 # -- def WARNING -------------------------------------------------------------------------------{{{-
519 
520 @UseStackFrameFromCallerForLogging
521 def WARNING (msg):
522  Logging_warning(msg, depth=1)
523 # ----------------------------------------------------------------------------------------------}}}-
524 
525 # -- def ERROR ---------------------------------------------------------------------------------{{{-
526 
527 @UseStackFrameFromCallerForLogging
528 def ERROR (msg):
529  Logging_error(msg, depth=1)
530 # ----------------------------------------------------------------------------------------------}}}-
531 
532 # -- def DEBUG_STOP ---------------------------------------------------------------------------------{{{-
533 
534 @UseStackFrameFromCallerForLogging
535 def DEBUG_STOP():
536  Logging_info("Stopping because of DEBUG_STOP()", depth=1)
537  Logging_setStopped(True)
538  raise CancelTestException
539 # ----------------------------------------------------------------------------------------------}}}-
540 
541 from .Base import verifyFalse as Base_verifyFalse, verifyTrue as Base_verifyTrue, \
542  compareEqual as Base_compareEqual, compareNotEqual as Base_compareNotEqual, \
543  compareLessThan as Base_compareLessThan, compareLessThanOrEqual as Base_compareLessThanOrEqual, \
544  compareFloatEqual as Base_compareFloatEqual, compareFloatNotEqual as Base_compareFloatNotEqual, \
545  compareFloatLessThanOrEqual as Base_compareFloatLessThanOrEqual, \
546  compareFloatLessThan as Base_compareFloatLessThan
547 from .Logging import error as Logging_error, warning as Logging_warning, info as Logging_info, setStopped as Logging_setStopped
548 
def EXPECT_FLOAT_LT(a, b, msg=None, logOnSuccess=None)
Expect first given value to be less than the second.
Definition: Macros.py:376
def EXPECT_FLOAT_GT(a, b, msg=None, logOnSuccess=None)
Expect first given value to be greater than the second.
Definition: Macros.py:326
def EXPECT_PATH_EXISTS(path, msg=None, logOnSuccess=None)
Expect the given path to exist.
Definition: Macros.py:474
def EXPECT_NE(expected, actual, msg=None, logOnSuccess=None)
Expect given values to be not equal.
Definition: Macros.py:153
def ASSERT_FALSE(expr, msg=None, logOnSuccess=None)
Throw exception if given expression does not evaluate to false.
Definition: Macros.py:92
def ASSERT_LT(a, b, msg=None, logOnSuccess=None)
Throw exception if first given value is not less than the second.
Definition: Macros.py:213
def ERROR(msg)
Create an error message.
Definition: Macros.py:527
def EXPECT_NOT_EMPTY(a, msg=None, logOnSuccess=None)
Expect given container to be not empty.
Definition: Macros.py:433
def INFO(msg)
Create an info message.
Definition: Macros.py:513
def ASSERT_LE(a, b, msg=None, logOnSuccess=None)
Throw exception if first given value is not less than or equal to the second.
Definition: Macros.py:237
def EXPECT_EMPTY(a, msg=None, logOnSuccess=None)
Expect given container to be empty.
Definition: Macros.py:413
def ASSERT_NOT_EMPTY(a, msg=None, logOnSuccess=None)
Throw exception if given container is empty.
Definition: Macros.py:442
def ASSERT_EMPTY(a, msg=None, logOnSuccess=None)
Throw exception if given container is not empty.
Definition: Macros.py:422
def DEBUG_STOP()
Stops a test immediately for debugging purposes.
Definition: Macros.py:534
def EXPECT_EQ(expected, actual, msg=None, logOnSuccess=None)
Expect given values to be equal.
Definition: Macros.py:129
def ASSERT_FLOAT_EQ(expected, actual, msg=None, epsilon=0.0001, logOnSuccess=None)
Throw exception if given values are not equal.
Definition: Macros.py:262
def ASSERT_GE(a, b, msg=None, logOnSuccess=None)
Throw exception if first given value is less than the second.
Definition: Macros.py:189
def ASSERT_FLOAT_GE(a, b, msg=None, epsilon=0.0001, logOnSuccess=None)
Throw exception if first given value is not greater than or equal to the second.
Definition: Macros.py:338
def ASSERT_FLOAT_LE(a, b, msg=None, epsilon=0.0001, logOnSuccess=None)
Throw exception if first given value is not less than or equal to the second.
Definition: Macros.py:388
def EXPECT_GT(a, b, msg=None, logOnSuccess=None)
Expect first given value to be greater than the second.
Definition: Macros.py:178
def ASSERT_FLOAT_GT(a, b, msg=None, logOnSuccess=None)
Throw exception if first given value is not greater than the second.
Definition: Macros.py:313
def EXPECT_FLOAT_GE(a, b, msg=None, epsilon=0.0001, logOnSuccess=None)
Expect first given value to be greater than or equal to the second.
Definition: Macros.py:352
def ASSERT_NE(expected, actual, msg=None, logOnSuccess=None)
Throw exception if given values are equal.
Definition: Macros.py:140
def EXPECT_TRUE(expr, msg=None, logOnSuccess=None)
Expect given expression to evaluate to true.
Definition: Macros.py:81
def EXPECT_SIZE(a, size, msg=None, logOnSuccess=None)
Expect given container to have the given size.
Definition: Macros.py:454
def EXPECT_FALSE(expr, msg=None, logOnSuccess=None)
Expect given expression to evaluate to false.
Definition: Macros.py:105
def EXPECT_FLOAT_LE(a, b, msg=None, epsilon=0.0001, logOnSuccess=None)
Expect first given value to be less than or equal to the second.
Definition: Macros.py:402
def EXPECT_LT(a, b, msg=None, logOnSuccess=None)
Expect first given value to be less than the second.
Definition: Macros.py:226
def EXPECT_LE(a, b, msg=None, logOnSuccess=None)
Expect first given value to be less than or equal to the second.
Definition: Macros.py:250
def EXPECT_FLOAT_NE(expected, actual, msg=None, epsilon=0.0001, logOnSuccess=None)
Expect given values to be not equal.
Definition: Macros.py:302
def EXPECT_FLOAT_EQ(expected, actual, msg=None, epsilon=0.0001, logOnSuccess=None)
Expect given values to be equal.
Definition: Macros.py:276
def ASSERT_PATH_MISSING(path, msg=None, logOnSuccess=None)
Throw exception if given path is not missing, i.e.
Definition: Macros.py:505
def ASSERT_TRUE(expr, msg=None, logOnSuccess=None)
Throw exception if given expression does not evaluate to true.
Definition: Macros.py:69
def ASSERT_GT(a, b, msg=None, logOnSuccess=None)
Throw exception if first given value is less than or equal to the second.
Definition: Macros.py:165
def ASSERT_FLOAT_NE(expected, actual, msg=None, epsilon=0.0001, logOnSuccess=None)
Throw exception if given values are equal.
Definition: Macros.py:288
def EXPECT_GE(a, b, msg=None, logOnSuccess=None)
Expect first given value to be greater than or equal to the second.
Definition: Macros.py:202
def ASSERT_EQ(expected, actual, msg=None, logOnSuccess=None)
Throw exception if given values are not equal.
Definition: Macros.py:116
def ASSERT_SIZE(a, size, msg=None, logOnSuccess=None)
Throw exception if given container does not have the given size.
Definition: Macros.py:464
def EXPECT_PATH_MISSING(path, msg=None, logOnSuccess=None)
Expect the given path to be missing, i.e.
Definition: Macros.py:484
def ASSERT_PATH_EXISTS(path, msg=None, logOnSuccess=None)
Throw exception if given path does not exists.
Definition: Macros.py:494
def ASSERT_FLOAT_LT(a, b, msg=None, logOnSuccess=None)
Throw exception if first given value is not less than the second.
Definition: Macros.py:363
def WARNING(msg)
Create a warning message.
Definition: Macros.py:520