软件测试脚本
import os
# 引入os
import csv
# 引入csv
def gua(filename):
path=os.path.dirname(os.path.abspath(__file__))
now=path+'\\'+filename
print(now)
with open(now,'r',encoding="utf-8")as f:
data=csv.reader(f)
list=[]
for row in data:
list.append(row)
return list
if __name__ == '__main__':
data=gua('pinggua.csv')
for row in data:
print(row)
Disclaimer: The above articles are added by users themselves and are only for typing and communication purposes. They do not represent the views of this website, and this website does not assume any legal responsibility. This statement is hereby made! If there is any infringement of your rights, please contact us promptly to delete it.