Skip to content
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

Migrate to pytest #1148

Closed
Glandos opened this issue Feb 19, 2023 · 2 comments · Fixed by #1213
Closed

Migrate to pytest #1148

Glandos opened this issue Feb 19, 2023 · 2 comments · Fixed by #1213

Comments

@Glandos
Copy link
Member

Glandos commented Feb 19, 2023

Currently, we are using pytest for launching tests, but they are all written with Flask-Testing and unittest.

Since Flask-Testing is nearly dead, and Flask is moving fastly, we should move away from it, and use another way to write test. As far as I can tell, the base documentation for testing Flask can easily use fixtures of pytest.

In this issue, I want to discuss what we are currently using, and what could be done to move to pytest.

However, there might be other library I'm not aware of.

@Glandos
Copy link
Member Author

Glandos commented Feb 19, 2023

unittest.MagicMock and patch

Not yet identified

flask_testing.TestCase

  • Could be replaced by a fixture to create the app, as before.
  • Creating the database seems to be left as an exercise for the user.

unittest assertions

Not yet identified

@hamma741

This comment was marked as off-topic.

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

Successfully merging a pull request may close this issue.

2 participants