Skip to content

unittest or pytest #7

Answered by hitblast
gbowne1 asked this question in Q&A
Jul 1, 2022 · 1 comments · 11 replies
Discussion options

You must be logged in to vote

This entirely depends on what you plan to test. Both actually work pretty great, but if you choose to automate the testing using GitHub Actions or any other CI/CD service, I think Pytest is the way to go. Pytest is easily installable and can be integrated into the project with ease. All it takes is the testing functions with the assert keyword and an installed copy of Pytest.

Also since the bot's written in async/await syntax, you'd probably wanna go with the pytest-asyncio package since it supports coroutines as test functions.

Run the following command in your terminal window to install Pytest with async support:

$ pip install pytest-asyncio

An example followed by the installation:

from m…

Replies: 1 comment 11 replies

Comment options

You must be logged in to vote
11 replies
@hitblast
Comment options

@gbowne1
Comment options

gbowne1 Jul 12, 2022
Maintainer Author

@hitblast
Comment options

@gbowne1
Comment options

gbowne1 Jul 17, 2022
Maintainer Author

@gbowne1
Comment options

gbowne1 Oct 29, 2022
Maintainer Author

Answer selected by gbowne1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested
2 participants