title: how to automatically change to pytest temporary directory for all doctests
body: <p>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:</p>
  
  <pre><code>&gt;&gt;&gt; tmp = getfixture('tmpdir')                                                                                            
  &gt;&gt;&gt; old = tmp.chdir()                                                                                                   
  </code></pre>