O'Reilly logo
  • Chris Kang thinks this is interesting:

base_temp = tmpdir_factory.getbasetemp()

From

Cover of Python Testing with pytest

Note

getbasetemp() moves up the directory tree.