title: PyTest: Auto delete temporary directory created with tmpdir_factory
body: <p>I'm trying to create a temporary directory with a specific name (eg, "data") for all tests within a module using PyTest's <code>tmpdir_factory</code> similar to the <a href="https://docs.pytest.org/en/latest/tmpdir.html#the-tmpdir-factory-fixture" rel="noreferrer">tutorial</a>:</p>
  
  <pre><code>@pytest.fixture(scope='module')
  def project_file(self, tmpdir_factory):
      return tmpdir_factory.mktemp("data")
  </code></pre>
  
  <p>I'm using the temporary directory in some tests within the module successfully. However, the directory still exists after running the tests and when I run them again, I get a failure because I cannot create a new temporary directory with name "data".</p>
  
  <p>How can I automatically delete the temporary directory "data" after the pytest tests finish? The <code>tmpdir</code> argument creates temporary directory that is removed but it doesn't have a name and it only has function scope.</p>