-
Notifications
You must be signed in to change notification settings - Fork 226
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
[ATO-887] Upgrade Sanic and Sanic-testing #1057
Conversation
073d63e
to
a2c0e74
Compare
894e7e6
to
80d0324
Compare
tests/test_endpoint.py
Outdated
|
||
|
||
# ENSURE THIS IS ALWAYS THE LAST TEST FOR OTHER TESTS TO RUN | ||
# for some reason, sys.exit is actually called here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually expected given this line that gets called as a result of this test:
Line 266 in c1fec2a
sys.exit(1) |
I would investigate more on why this breaks the pytest command if placed anywhere else in the test module, maybe other users of Sanic have encountered this as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I did some investigation and couldn't find anything helpful.
It appeared the line was actually being executed by pytest, so any other thing afterwards isn't being run.
Not sure why it appeared with the updated Sanic version though and I couldn't find anything linking it to the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if it's not because of the incongruent version of sanic-testing with sanic? I'd test this again once you upgrade to sanic 22.12, that's the version you used for sanic-testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was hoping that was the case too and tried it after the upgrade but it still persists.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be a package that manages the ordering, but I'm not sure the effort is worth it for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah definitely not worth the effort.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd just replace the last line comment to say call to sys.exit() terminates pytest process
or smth along those lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we know if all the tests in the suite run actually, maybe we actually need to disable this and investigate later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah just checked the CI, all looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment updated.
Proposed changes:
Status (please check what you already did):
black
(please check Readme for instructions)