Remove print statements from Python tests

Use exceptions instead of printing to stdout.
Part of an effort to convert Python tests to python 3 syntax.
This commit is contained in:
William S Fulton 2020-08-13 21:22:47 +01:00
commit 365d4961d4
40 changed files with 123 additions and 254 deletions

View file

@ -17,13 +17,13 @@ if len(sys.argv) >= 2 and sys.argv[1] == "benchmark":
a = bytearray(b"hello world")
for i in range(k):
python_pybuffer.title1(a)
print "Time used by bytearray:", time.time() - t
print("Time used by bytearray: {}".format(time.time() - t))
t = time.time()
b = "hello world"
for i in range(k):
python_pybuffer.title2(b)
print "Time used by string:", time.time() - t
print("Time used by string: {}".format(time.time() - t))
else:
# run the test case
buf1 = bytearray(10)