Files
004_comission/hdhdjshxh/task2/project/doc/transpose.py
louiscklaw 118e4a5f39 update,
2025-01-31 19:51:33 +08:00

39 lines
966 B
Python

import csv
print('''# TEST plan
### Test purpose
1. Validation on the input data and display appropriate error messages
1. Test Plan with test cases and test results.''')
print('\n')
print('\n')
print('\n')
# read a csv file named test.csv
with open('test.csv', 'r') as f:
# creating a csv reader object
csvreader = csv.reader(f)
# extracting each data row one by one
for row in csvreader:
print(f'### Test #{row[0]}')
print('\n')
print(f'| del me | del me |')
print(f'| ----- | ----- |')
print(f'| Test Case Name | {row[1]} |')
print(f'| Procedure | {row[2].replace("<br />",'\\n')} |')
print(f'| Expected Output | {row[3].replace("<br />",'\\n')} |')
print(f'| Result | {row[4].replace("<br />",'\\n')} |')
print('\n')
print("### Screen capture")
print( '\n'.join([ (f'\n#### step {i+1} screenshot\n'+x.strip()) for i, x in enumerate(row[5].split("<br />"))]) )
print('\n')
print('\n')