Sanic unit testing!

While going though on-boarding instructions for new contributors, I setup dev environment and run tests using tox. I observed that the test_multiprocessing was talking long time to run and waited for some time before decided to kill. I understand some category (performance, load) of tests may take long time to run but otherwise, unit tests should finish quick. Let me know if i am missing something here.

Yes, the contribution guidelines should be updated because running the full tox command can be lengthy.

Typically I run only a single environment at a time

tox -e py37

But this still can take a while in some tests. So, I try to target what I am looking for. You can do this by passing args as you would for pytest after --

tox -e py37 -- tests/test_cookies.py -vs
1 Like

May I update the CONTRIBUTING.md with details you just mentioned ? What is the process for that ?

  1. create pull request
  2. change
  3. submit

Yes, I also want to include some details about our adopted code quality. We use black and isort for enforcing formatting consistency.

Another thing I want to add is maybe a checklist of sorts for considerations before submitting a PR, example: using git rebate -i to try and limit the number of commits per PR.

But if you are willing to throw a first draft together Iā€™d be happy to add my $.02.