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

Fix using the default session while removing a task #131

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

carlosporta
Copy link

As discussed in #130, here is the fix. I removed the set session as default, so the test test_remove stopped passing. Finally, I changed the function remove_task to not use the default session.

@Miksus
Copy link
Owner

Miksus commented Oct 19, 2022

Thanks for investing the time to fix this! I respect the time you invested.

Mind you if I add a simple test to this PR for the task removal using the regular application creation?

@@ -80,7 +80,7 @@ def session():
"task_execution": "process",
}, delete_existing_loggers=True)
rocketry.session = session
session.set_as_default()
# session.set_as_default()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the tests fail because of this. I'll investigate this further but I think what you did here should be done as the default sessions should be eventually removed.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inspecting the tests that failed, I think the fault is just in the tests. This failure rocketry/test/condition/test_core.py:62: AssertionError relies on the boolean operation of the conditions which is not actually used by the internals but this uses the defaults as you cannot pass arguments to __bool__ except the object itself.

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