[x] I have reviewed the OFRAK contributor guide and attest that this pull request is in accordance with it.
Currently running the test suite (specifically test_function_replacement_modifier) pollutes the current directory with these output files which the developer has to clean up to get a clean working tree. This changes it to use pytest's tmp_path fixture.
The output files from subsequent runs are saved in pytest's temporary directories like so instead of being overwritten:
ofrakdev@e9d35e42d66b:/workspaces/rbs-ofrak/ofrak$ cd /tmp/pytest-of-ofrakdev/pytest-
pytest-0/ pytest-1/ pytest-current/
ofrakdev@e9d35e42d66b:/workspaces/rbs-ofrak/ofrak$ cd /tmp/pytest-of-ofrakdev/pytest-1/
ofrakdev@e9d35e42d66b:/tmp/pytest-of-ofrakdev/pytest-1$ ls
test_function_replacement_modi0 test_function_replacement_modi2 test_function_replacement_modi4 test_function_replacement_modi6 test_function_replacement_modicurrent
test_function_replacement_modi1 test_function_replacement_modi3 test_function_replacement_modi5 test_function_replacement_modi7
ofrakdev@e9d35e42d66b:/tmp/pytest-of-ofrakdev/pytest-1$ ls test_function_replacement_modi0
replaced_hello.out replaced_hello.out.lock
Currently running the test suite (specifically
test_function_replacement_modifier
) pollutes the current directory with these output files which the developer has to clean up to get a clean working tree. This changes it to use pytest'stmp_path
fixture.The output files from subsequent runs are saved in pytest's temporary directories like so instead of being overwritten: