Open
Description
In #1425 it was discovered that a test was failing due to a configuration file in the user's home directory. Some tests also populate the global scope and fail the second time they are run.
By using pytest's tmpdir
fixture and setting some environmental variables, it should be possible to improve the isolation of tests (at the expense of adding a bit more runtime to the test suite).
An example of how it's done from the pip
test suite: https://github.com/pypa/pip/blob/db127330d4e071c84c5e1c107f60f8229e7d68ce/tests/conftest.py#L79-L148