-
Notifications
You must be signed in to change notification settings - Fork 104
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
Utilize atexit making sure connection info is deleted #2352
Conversation
4c76b2c
to
f158799
Compare
Jenkins: Test this please! |
9198115
to
f158799
Compare
ert_shared/services/_base_service.py
Outdated
""" | ||
file = Path(f"{service_name}_server.json") | ||
if file.exists(): | ||
file.unlink() |
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.
Maybe something like to unregister?:
file.unlink() | |
file.unlink() | |
atexit.unregister(delete_connection_info) |
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.
nop, no difference
a66d11b
to
7c030fd
Compare
@atexit.register | ||
def cleanup_service_files(): | ||
for service_name in SERVICE_NAMES: | ||
file = Path(f"{service_name}_server.json") |
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 says "server", while the test says "service"
7f43a57
to
f8452ac
Compare
|
||
def test_cleanup_service_files(tmpdir): | ||
global SERVICE_NAMES | ||
|
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.
Perhaps this global should be deleted or cleaned up so it does not mess up other tests?
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.
LGTM
6fda528
to
b92e540
Compare
No description provided.