This code creates a unique temporary directory, and sets tmp_dir to its location.

Create a unique temporary dir:

python
def test_whatever(self):
    tmp_dir = self.get_auto_remove_tmp_dir()
tmp_dir will contain the path to the created temporary dir. It will be automatically removed at the end of the
test.

Create a temporary dir of my choice, ensure it's empty before the test starts and don't empty it after the test.