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

# tmpdir already has a path name associated with it​​ # join() extends the path to include a filename​​ # the file is created when it's written to

From

Cover of Python Testing with pytest

Note

Having "tmpdir" as a dependent fixture creates a path in which the tmp file will be created. You need to call "join()" with the file name you want. A default directory is already associated with a returned tmpdir object from fixture call (setup).