-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(backend, tests): move prefect fixtures
Run Prefect only when required. Since we do autouse, it would also run during benchmark tests which is not required. Signed-off-by: Fatih Acar <[email protected]>
- Loading branch information
1 parent
078bc3c
commit 00f3de9
Showing
4 changed files
with
43 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import pytest | ||
from prefect.logging.loggers import disable_run_logger | ||
from prefect.testing.utilities import prefect_test_harness | ||
|
||
|
||
@pytest.fixture(scope="session", autouse=True) | ||
def prefect_test_fixture(): | ||
with prefect_test_harness(): | ||
yield | ||
|
||
|
||
@pytest.fixture(scope="session") | ||
def prefect_test(prefect_test_fixture): | ||
with disable_run_logger(): | ||
yield |
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