Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Clean up after tests #84

Open
OndrejMarsalek opened this issue Sep 25, 2015 · 0 comments
Open

Clean up after tests #84

OndrejMarsalek opened this issue Sep 25, 2015 · 0 comments

Comments

@OndrejMarsalek
Copy link
Collaborator

When IO tests fail, the files tests/test.pos_1.pdb and tests/test.pos_1.xyz can be left in the working tree. The easiest way to do it is probably using with_setup and making sure the files are gone:

https://nose.readthedocs.org/en/latest/writing_tests.html#test-functions

This might be more robust than trying to make sure that the test function itself is always able to clean up after itself. Another option would be to use a test class (instead of test functions), which can have its own setup and cleanup. Other suggestions are welcome, of course. Whatever the solution, it should be reused for all tests that write files.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant