I am trying to test the methods as specified in my class. I have been doing this by global to pass into my method like csv.preprocess_col(df, field, remove_invalid_rows_or_raise_exception=0) with a global df to a path.
But for now I would like to pass by parameter through functions by doing test_df(df) instead of the regular test_df() to test my functions (csv.preprocess_col) inside it but I keep getting this fixture 'df' not found error
Anyone knows how to solve it?
Just a curious question, for pytest is it ok to do by global to pass the parameters into the function?
Aucun commentaire:
Enregistrer un commentaire