-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* test(deps): add unit test for the deps matrix reporting * bump poetry plugin to 1.18.3 * bump cli version to 1.5.4
- Loading branch information
1 parent
afd8cfc
commit 6d49440
Showing
3 changed files
with
28 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from polylith.deps.report import create_rows | ||
|
||
bases_in_workspace = {"x"} | ||
components_in_workspace = {"a", "b"} | ||
|
||
|
||
def test_to_row_returns_columns_for_all_bricks(): | ||
expected_length = len(bases_in_workspace) + len(components_in_workspace) | ||
|
||
# the base x imports the component a | ||
# the component a imports the component b | ||
# the component b imports nothing | ||
collected_import_data = {"x": {"a"}, "a": {"b"}} | ||
flattened_imports = set().union(*collected_import_data.values()) | ||
|
||
rows = create_rows( | ||
bases_in_workspace, | ||
components_in_workspace, | ||
collected_import_data, | ||
flattened_imports, | ||
) | ||
|
||
assert len(rows) == expected_length | ||
|
||
for columns in rows: | ||
assert len(columns) == expected_length |