软件测试脚本
# 引入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)