-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add fixture for CLI tests requiring sample dags (#26536)
I noticed that various CLI tests were failing (specifically in test_task_command.py) when run locally but not when run in breeze. I figured out the cause is that breeze has ('core', 'load_examples') set to true but I had it false locally. To fix this we can add a fixture that patches the conf settings. But we have to go one step further. If we grab the conf value in the default for the argument in DagBag, this means the value is fixed at the time the class gets defined. So the value cannot be changed later in runtime! The solution is to resolve the default on the fly each time an instance is created. We do the same for safe_mode while we're at it, because why not.
- Loading branch information
1 parent
bd6d5e7
commit 6cc6d00
Showing
3 changed files
with
27 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters