-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reorganize tests with fixtures #1371
Comments
Tried on [test_actions.py=(https://github.com/vatlab/sos/blob/master/test/test_actions.py), it is a lot of work but the tests are lot cleaner and clearer. The fixtures that were implemented were
Examples
|
@joannfeng All tests now pass, including windows. I have also wrote a little script to renamed the tests. |
Right now our tests uses unittest, and have things such as
These functions are called for all tests in the group and does not allow individual tests to have more or less setup/teardown procedures.
Fixture in pytest is a more flexible solution for tests and we should try to use it. For example, we should provide fixtures such as
and the advantage is that these files will be automatically removed after the tests are done.
The text was updated successfully, but these errors were encountered: