Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/polylith/commands/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ def get_imported_bricks_in_tests(
root: Path, ns: str, tag_name: Union[str, None], theme: str
) -> Set[str]:
files = test.get_changed_files(root, tag_name)
imports = test.get_brick_imports_in_tests(root, ns, theme, files)
brick_imports = test.get_brick_imports_in_tests(root, ns, theme, files)

return set().union(*imports.values())
return set().union(*brick_imports.values())


def extract_brick_names(bricks_data: List[dict], imported_bricks: Set[str]) -> Set[str]:
Expand Down
8 changes: 6 additions & 2 deletions components/polylith/test/core.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from pathlib import Path
from typing import List, Union

from polylith import check, diff
from polylith import check, diff, imports


def is_test(root: Path, ns: str, path: Path, theme: str) -> bool:
Expand Down Expand Up @@ -30,4 +30,8 @@ def get_brick_imports_in_tests(
) -> dict:
matched = {f for f in files if is_test(root, ns, f, theme)}

return check.collect.extract_bricks(matched, ns)
listed_imports = [imports.list_imports(m) for m in matched]

all_imports = {k: v for k, v in enumerate(listed_imports)}

return check.grouping.extract_brick_imports(all_imports, ns)
2 changes: 1 addition & 1 deletion projects/poetry_polylith_plugin/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "poetry-polylith-plugin"
version = "1.37.0"
version = "1.37.1"
description = "A Poetry plugin that adds tooling support for the Polylith Architecture"
authors = ["David Vujic"]
homepage = "https://davidvujic.github.io/python-polylith-docs/"
Expand Down
2 changes: 1 addition & 1 deletion projects/polylith_cli/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "polylith-cli"
version = "1.27.0"
version = "1.27.1"
description = "Python tooling support for the Polylith Architecture"
authors = ['David Vujic']
homepage = "https://davidvujic.github.io/python-polylith-docs/"
Expand Down