update layout of test_helper.py
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 7 May 2019 05:53:16 +0000 (06:53 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 7 May 2019 05:53:16 +0000 (06:53 +0100)
src/TestUtil/test_helper.py

index d22124b838b494f7e30213a7e76d23da535ab0d4..c42990d66e5b8579867f88af834954e3713b0eb7 100644 (file)
@@ -1,27 +1,30 @@
-# Verifies the given values given the particular operand
-# Arguments:
-#   p (Prefix): Appended to the front of the assert statement
-#   e (Expected): The expected value
-#   o (Output): The output result
-#   op (Operation): (0 => ==), (1 => !=)
 def assert_op(pre, o, e, op):
+    """ Verifies the given values given the particular operand
+        Arguments:
+            p (Prefix): Appended to the front of the assert statement
+            e (Expected): The expected value
+            o (Output): The output result
+            op (Operation): (0 => ==), (1 => !=)
+    """
     if op == 0:
         assert_eq(pre, o, e)
     else:
         assert_ne(pre, o, e)    
 
-# Verifies the given values are equal
-# Arguments:
-#   p (Prefix): Appended to the front of the assert statement
-#   e (Expected): The expected value
-#   o (Output): The output result
 def assert_eq(p, o, e):
+    """ Verifies the given values are equal
+        Arguments:
+           p (Prefix): Appended to the front of the assert statement
+           e (Expected): The expected value
+           o (Output): The output result
+    """
     assert o == e, p + " Output " + str(o) + " Expected " + str(e)
     
-# Verifies the given values are not equal
-# Arguments:
-#   p (Prefix): Appended to the front of the assert statement
-#   e (Expected): The expected value
-#   o (Output): The output result
 def assert_ne(p, o, e):
-    assert o != e, p + " Output " + str(o) + " Not Expecting " + str(e) 
\ No newline at end of file
+    """ Verifies the given values are not equal
+        Arguments:
+           p (Prefix): Appended to the front of the assert statement
+           e (Expected): The expected value
+           o (Output): The output result
+    """
+    assert o != e, p + " Output " + str(o) + " Not Expecting " + str(e)