This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from PrefectHQ/prep-v0.2.0
Prep v0.2.0
- Loading branch information
Showing
7 changed files
with
52 additions
and
49 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
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
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,22 @@ | ||
import pytest | ||
from prefect.blocks.core import Block | ||
from prefect.testing.standard_test_suites import BlockStandardTestSuite | ||
from prefect.utilities.dispatch import get_registry_for_type | ||
from prefect.utilities.importtools import to_qualified_name | ||
|
||
|
||
def find_module_blocks(): | ||
blocks = get_registry_for_type(Block) | ||
module_blocks = [ | ||
block | ||
for block in blocks.values() | ||
if to_qualified_name(block).startswith("prefect_kubernetes") | ||
] | ||
return module_blocks | ||
|
||
|
||
@pytest.mark.parametrize("block", find_module_blocks()) | ||
class TestAllBlocksAdhereToStandards(BlockStandardTestSuite): | ||
@pytest.fixture | ||
def block(self, block): | ||
return block |