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

Move SMTP driver code into a function #67

Merged
merged 2 commits into from
Jul 2, 2023

Conversation

diazona
Copy link
Contributor

@diazona diazona commented Jun 26, 2023

pytest_localserver.smtp allows running itself as a module to start up an SMTP server, which is implemented by a bit of driver code guarded by an if __name__ == "__main__" block. Typical best practice is to put that code in a main() function, which is what I'm doing in this commit.

pytest_localserver.smtp allows running itself as a module to start up
an SMTP server, which is implemented by a bit of driver code guarded by
an `if __name__ == "__main__"` block. Typical best practice is to put
that code in a `main()` function, which is what I'm doing in this
commit.
@diazona diazona added this to the v0.8.0 milestone Jun 26, 2023
@diazona diazona requested review from coordt and redtoad June 26, 2023 02:37
@diazona diazona self-assigned this Jun 26, 2023
Python 2.4 is no longer anywhere close to supported so we can put
`except` and `finally` in the same `try` block now.
@diazona diazona merged commit 706b160 into master Jul 2, 2023
@diazona diazona deleted the smtp-driver-to-function/1/dev branch July 2, 2023 19:15
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.

2 participants