I am at the stage of studying the use of python as a tool for QA software.
I wrote the following simple test to find the letter "a" in the matrix of text file numbers. the problem is that the test fails, although the wait is the same as what I received.
Why? Can you tell me what I'm doing wrong?
test script:
fin = open("abc.txt", "r") arr_fin = [] for line in fin: arr_fin.append(line.split()) print arr_fin for row in arr_fin: arr_fin_1 = " ".join('{0:4}'.format(i or " ") for i in row) print arr_fin_1 def find_letter(x, arr_fin_1): """ >>> find_letter('a', arr_fin_1) 97 """ t=ord(x)
error message:
Expected: 97 Got: 97 ********************************************************************** 1 items had failures: 1 of 1 in __main__.find_letter ***Test Failed*** 1 failures.
source share