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

Test mode #1894

Merged
merged 19 commits into from
Jul 15, 2020
Merged

Test mode #1894

merged 19 commits into from
Jul 15, 2020

Conversation

ahopkins
Copy link
Member

@ahopkins ahopkins commented Jul 9, 2020

One thing that I plan to add to the sanic-test module is the ability for Sanic app to be aware of whether or not it is being tested. This adds a variable to the Sanic app that is set by the internal test clients.

Tronic
Tronic previously approved these changes Jul 12, 2020
@Tronic
Copy link
Member

Tronic commented Jul 12, 2020

What's up with the failing tests, is it related to this one?

@ahopkins
Copy link
Member Author

Ummm.... this is super weird. At one point I had added a check here to check against test_mode and not throw that warning. Which would make the test that failed fail. We would have needed to change it. But... I decided against that since if someone wants to suppress that warning it would be simple enough, and it might be good for them to see it in their test suite and ask themselves why that is.

But, none of that happened. I left the test the way it is.

I am going to resubmit the test suite.

@ahopkins
Copy link
Member Author

Ignore the ridiculous number of commits. I was going too fast.

@ahopkins
Copy link
Member Author

Ready for review and merge.

@codecov
Copy link

codecov bot commented Jul 14, 2020

Codecov Report

Merging #1894 into master will increase coverage by 0.03%.
The diff coverage is 76.92%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1894      +/-   ##
==========================================
+ Coverage   92.13%   92.16%   +0.03%     
==========================================
  Files          27       27              
  Lines        3076     3089      +13     
  Branches      552      552              
==========================================
+ Hits         2834     2847      +13     
- Misses        168      169       +1     
+ Partials       74       73       -1     
Impacted Files Coverage Δ
sanic/testing.py 96.25% <75.00%> (-1.73%) ⬇️
sanic/app.py 93.48% <100.00%> (+0.01%) ⬆️
sanic/server.py 79.61% <0.00%> (+0.57%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9f2818e...521ae7f. Read the comment docs.

@ashleysommer ashleysommer merged commit 5ee8ee7 into master Jul 15, 2020
@ahopkins ahopkins deleted the test_mode branch July 15, 2020 16:44
@ahopkins ahopkins mentioned this pull request Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants