From 7d2b5f673e92713856d6e27357be4112b92c0d52 Mon Sep 17 00:00:00 2001 From: Daniel Benusovich Date: Sat, 23 Feb 2019 10:17:44 -0800 Subject: [PATCH] Adding test utility class --- TestUtil/test_helper.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 TestUtil/test_helper.py diff --git a/TestUtil/test_helper.py b/TestUtil/test_helper.py new file mode 100644 index 00000000..0d5329ca --- /dev/null +++ b/TestUtil/test_helper.py @@ -0,0 +1,11 @@ +# Verifies the given values via the requested operation +# 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 check(p, o, e, op): + if(op == 0): + assert o == e, p + " Output " + str(o) + " Expected " + str(e) + else: + assert o != e, p + " Output " + str(o) + " Not Expecting " + str(e) \ No newline at end of file -- 2.30.2