lundi 24 août 2020

running python script inside pytest test case file, so that that output of python script can be utilsed in the testcases(pytest)

I have one python script i.e. xyz.py which is having certain preprocessing step and certain function..

let's say xyz.py

#connection string
#sql query (to fetch data)
def method():
   print('abc')
def method():
   print('pqr')

I wanted to use the output of this xyz.py file in my pytest testcases which is separate file i.e. test_rnk

can any suggest how this could be done..

Aucun commentaire:

Enregistrer un commentaire