-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fixes # 3592 - Clarify Fixtures' Documentation #3642
Conversation
I see the builds have failed. Will take a look at why |
Hi @caramelomartins, thanks for the contribution. You can run the linting checks by installing pre-commit, see the contributing guide for details. 👍 |
Thanks @caramelomartins, but I think there are a few spots where it still uses |
@nicoddemus I'll take a look. There were some that I left because I thought they made sense but I'll review it again (using EDIT: Just fixing a typo. |
@nicoddemus I've noticed there were a lot of missing |
Thanks @caramelomartins! I took the liberty of running pre-commit in order to fix linting on CI. I will review the rest of the PR as soon as I can. 👍 |
@nicoddemus Thank you for running the linter. 🏅 Let me know if you find any more troubles. 👍 |
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.
Thanks @caramelomartins!
I couldn't find the source of the problems I found here. I will take another look as soon as I can.
@@ -456,8 +457,8 @@ server URL in its module namespace:: | |||
|
|||
smtpserver = "mail.python.org" # will be read by smtp fixture | |||
|
|||
def test_showhelo(smtp): | |||
assert 0, smtp.helo() | |||
def test_showhelo(smtp_connection): |
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 code seems right, but is raising a NameError
below, not sure why...
doc/en/fixture.rst
Outdated
> assert 0 # for demo purposes | ||
E assert 0 | ||
def test_ehlo(smtp_connection): | ||
> response, msg = smtp_connection.ehlo() |
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.
Here it is also weird, the fixture value is actually the function...
doc/en/fixture.rst
Outdated
> assert 0 # for demo purposes | ||
E assert 0 | ||
def test_noop(smtp_connection): | ||
> response, msg = smtp_connection.noop() |
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.
Here it is also weird, the fixture value is actually the function...
doc/en/fixture.rst
Outdated
> assert b"smtp.gmail.com" in msg | ||
E AssertionError: assert b'smtp.gmail.com' in b'mail.python.org\nPIPELINING\nSIZE 51200000\nETRN\nSTARTTLS\nAUTH DIGEST-MD5 NTLM CRAM-MD5\nENHANCEDSTATUSCODES\n8BITMIME\nDSN\nSMTPUTF8' | ||
def test_ehlo(smtp_connection): | ||
> response, msg = smtp_connection.ehlo() |
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.
Here it is also weird, the fixture value is actually the function...
doc/en/fixture.rst
Outdated
> assert 0 # for demo purposes | ||
E assert 0 | ||
def test_noop(smtp_connection): | ||
> response, msg = smtp_connection.noop() |
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.
Here it is also weird, the fixture value is actually the function...
@nicoddemus I'll explore the problems you highlight once I can. 👍 |
@caramelomartins thanks! I've been meaning to take a look myself, but didn't find the time yet. 👍 |
Hi @caramelomartins, Found the problem, it was just a print that was using the old name (4dfe2ee). I regenerated the docs myself and now this is good to go. Thanks again for the PR! 👍 |
Ah, shame I couldn't catch it @nicoddemus . Thanks for the patience and for the awesome work on pytest! |
Hey,
I'm starting to use
pytest
and thought I'd give a small help. I've noticed #3592 hasn't been fixed yet. I decided to go the suggested way withsmtp_connection
because it felt clearer. This PR only features documentation changes.Since the page was quite large and I am inexperienced, I'll review it again tomorrow but this gives an opportunity for sharing what has already been done.
Fixes #3592
Checklist:
changelog
folder, with a name like<ISSUE NUMBER>.<TYPE>.rst
. See changelog/README.rst for details.master
branch for bug fixes, documentation updates and trivial changes.Not Applicable:
features
branch for new features and removals/deprecations.I didn't add myself to
AUTHORS
because I don't believe it warrants that.Hope everything is okay. Let me know if changes are needed.
Regards,
Hugo