Fix using the default session while removing a task#131
Fix using the default session while removing a task#131carlosporta wants to merge 1 commit intoMiksus:masterfrom
Conversation
|
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? |
| }, delete_existing_loggers=True) | ||
| rocketry.session = session | ||
| session.set_as_default() | ||
| # session.set_as_default() |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
As discussed in #130, here is the fix. I removed the set session as default, so the test
test_removestopped passing. Finally, I changed the functionremove_taskto not use the default session.