Skip to content

Move SMTP driver code into a function - #67

Merged
diazona merged 2 commits into
masterfrom
smtp-driver-to-function/1/dev
Jul 2, 2023
Merged

Move SMTP driver code into a function#67
diazona merged 2 commits into
masterfrom
smtp-driver-to-function/1/dev

Conversation

@diazona

@diazona diazona commented Jun 26, 2023

Copy link
Copy Markdown
Contributor

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