Simplify tests using pytest fixtures
Simplify tests using pytest fixtures

Instead of manually creating temporary directories and following through
with the cleanup, use pytest's tmpdir fixtures. It makes writing test
files easier and does automatic cleanup.

https://docs.pytest.org/en/latest/tmpdir.html

By leveraging pytest, can remove a lot of unnecessary code.

PyCQA/isort,PyCQA/isort