I have created a new fork initially named tempdir2, then deleted the first patch queue version and renamed tempdir2 to tempdir - sorry for the mess, you can ignore all previous mails/notifications.
The result is - now you can get all three commits through this pull request/ the tempdir fork.
As a first step the tests has been cleaned up - all mock use has been removed (I had the feeling they are not entirely OK anyway), without this first change new functionality could not be tested easily.
The implemented new features are
a function decorator (@within_temp_dir) and a context manager (in_temp_dir()) to change working directory to the temporary directory
syntactic sugar for os.path.join on TempDir():
TempDir() / "relpath"
has the value of "relpath" added to the temporary directory as an absolute path.
The first feature is something I have not seen before, the / magic concatenation appears in some other modules as well.
Sorry about the delay. I think the convenience context manager and decorator are really good ideas.
I do like my tests not touching the filesystem too much though :)
I implemented the wrappers in a less intrusive way.
Do you use the / magic a lot? I've mostly used the module to provide storage directories for external tools, so I haven't had any need, but if you can provide me with a smaller pull request just featuring that, I'll gladly merge it