jeudi 26 octobre 2017

how to automatically change directory for all doctests running pytest

I would like to change to pytest temporary directory at the beginning of each doctest and I was wondering if there is a way to do it automatically without starting every doctests with:

>>> tmp = getfixture('tmpdir')                                                                                            
>>> old = tmp.chdir()                                                                                                   

Aucun commentaire:

Enregistrer un commentaire