-
Notifications
You must be signed in to change notification settings - Fork 24
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
Change init
from a function into a context manager
#112
base: trunk
Are you sure you want to change the base?
Conversation
e93e37f
to
0393e96
Compare
If possible it would be nice to have a unit test proving that both the context manager syntax and the normal syntax work. |
Co-Authored-By: miron-scm <[email protected]>
Sorry, but considering the PLAMS test suite (at least on github) currently lacks any sort of infrastructure for testing the likes of |
This PR changes
plams.init
from a function into a context manager.In addition to calling it as a normal function, as could be done previously,
plams.init
can now be used on conjunction with thewith
statement. In the latter caseplams.finish
will be automatically called upon exiting the context manager.Examples