diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index edf03154..4b2dc012 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -50,7 +50,7 @@ jobs: run: | cd test cd aspect - python execute_tests.py -t using_transitive_dep/detect_using_transitive_dep -v -b 7.0.0 -p 3.11.6 + python execute_tests.py -v -b 7.0.0 -p 3.11.6 # integration-tests-apply-fixes: # runs-on: ubuntu-22.04 diff --git a/test/aspect/alias/test_invalid_dependency_through_alias.py b/test/aspect/alias/test_invalid_dependency_through_alias.py index c53ac412..d523ea78 100644 --- a/test/aspect/alias/test_invalid_dependency_through_alias.py +++ b/test/aspect/alias/test_invalid_dependency_through_alias.py @@ -1,3 +1,5 @@ +from pathlib import Path + from result import ExpectedResult, Result from test_case import TestCaseBase @@ -6,7 +8,7 @@ class TestCase(TestCaseBase): def execute_test_logic(self) -> Result: expected = ExpectedResult( success=False, - invalid_includes=["File='alias/use_a_and_b.cpp', include='alias/a.h'"], + invalid_includes=[f"File='{Path('alias/use_a_and_b.cpp')}', include='alias/a.h'"], ) actual = self._run_dwyu(target="//alias:use_a_transitively", aspect=self.default_aspect) diff --git a/test/aspect/ignore_includes/test_include_not_covered_by_patterns.py b/test/aspect/ignore_includes/test_include_not_covered_by_patterns.py index 36d1e6b2..bbc41721 100644 --- a/test/aspect/ignore_includes/test_include_not_covered_by_patterns.py +++ b/test/aspect/ignore_includes/test_include_not_covered_by_patterns.py @@ -1,3 +1,5 @@ +from pathlib import Path + from result import ExpectedResult, Result from test_case import TestCaseBase @@ -7,7 +9,7 @@ def execute_test_logic(self) -> Result: expected = ExpectedResult( success=False, invalid_includes=[ - "File='ignore_includes/use_not_ignored_header.h', include='example_substring_matching_does_not_work_here.h'" + f"File='{Path('ignore_includes/use_not_ignored_header.h')}', include='example_substring_matching_does_not_work_here.h'" ], ) actual = self._run_dwyu( diff --git a/test/aspect/target_mapping/test_use_c_with_direct_deps_mapping.py b/test/aspect/target_mapping/test_use_c_with_direct_deps_mapping.py index 3f41790c..62457cba 100644 --- a/test/aspect/target_mapping/test_use_c_with_direct_deps_mapping.py +++ b/test/aspect/target_mapping/test_use_c_with_direct_deps_mapping.py @@ -1,3 +1,5 @@ +from pathlib import Path + from result import ExpectedResult, Result from test_case import TestCaseBase @@ -6,7 +8,7 @@ class TestCase(TestCaseBase): def execute_test_logic(self) -> Result: expected = ExpectedResult( success=False, - invalid_includes=["File='target_mapping/use_lib_c.cpp', include='target_mapping/libs/c.h'"], + invalid_includes=[f"File='{Path('target_mapping/use_lib_c.cpp')}', include='target_mapping/libs/c.h'"], unused_public_deps=["//target_mapping/libs:a"], ) actual = self._run_dwyu( diff --git a/test/aspect/target_mapping/test_use_c_with_specific_mapping.py b/test/aspect/target_mapping/test_use_c_with_specific_mapping.py index 97eab6ef..e845a1f2 100644 --- a/test/aspect/target_mapping/test_use_c_with_specific_mapping.py +++ b/test/aspect/target_mapping/test_use_c_with_specific_mapping.py @@ -1,3 +1,5 @@ +from pathlib import Path + from result import ExpectedResult, Result from test_case import TestCaseBase @@ -6,7 +8,7 @@ class TestCase(TestCaseBase): def execute_test_logic(self) -> Result: expected = ExpectedResult( success=False, - invalid_includes=["File='target_mapping/use_lib_c.cpp', include='target_mapping/libs/c.h'"], + invalid_includes=[f"File='{Path('target_mapping/use_lib_c.cpp')}', include='target_mapping/libs/c.h'"], unused_public_deps=["//target_mapping/libs:a"], ) actual = self._run_dwyu( diff --git a/test/aspect/tree_artifact/test_invalid_tree_artifact.py b/test/aspect/tree_artifact/test_invalid_tree_artifact.py index d9c26f41..aeee919c 100644 --- a/test/aspect/tree_artifact/test_invalid_tree_artifact.py +++ b/test/aspect/tree_artifact/test_invalid_tree_artifact.py @@ -1,3 +1,5 @@ +from pathlib import Path + from result import ExpectedResult, Result from test_case import TestCaseBase @@ -7,7 +9,9 @@ def execute_test_logic(self) -> Result: expected = ExpectedResult( success=False, # We omit "File='bazel-out/<compilation_mode_and_platform> to allow testing in various environments - invalid_includes=["/bin/tree_artifact/sources.cc/tree_lib.cc', include='tree_artifact/some_lib.h'"], + invalid_includes=[ + f"{Path('/bin/tree_artifact/sources.cc/tree_lib.cc')}', include='tree_artifact/some_lib.h'" + ], ) actual = self._run_dwyu( target="//tree_artifact:tree_artifact_library", diff --git a/test/aspect/using_transitive_dep/test_detect_using_transitive_dep.py b/test/aspect/using_transitive_dep/test_detect_using_transitive_dep.py index ca181248..8f22da95 100644 --- a/test/aspect/using_transitive_dep/test_detect_using_transitive_dep.py +++ b/test/aspect/using_transitive_dep/test_detect_using_transitive_dep.py @@ -1,3 +1,5 @@ +from pathlib import Path + from result import ExpectedResult, Result from test_case import TestCaseBase @@ -6,7 +8,7 @@ class TestCase(TestCaseBase): def execute_test_logic(self) -> Result: expected = ExpectedResult( success=False, - invalid_includes=["File='using_transitive_dep/main.cpp', include='using_transitive_dep/foo.h'"], + invalid_includes=[f"File='{Path('using_transitive_dep/main.cpp')}', include='using_transitive_dep/foo.h'"], ) actual = self._run_dwyu(target="//using_transitive_dep:main", aspect=self.default_aspect) diff --git a/test/aspect/using_transitive_dep/test_detect_using_transitive_impl_dep.py b/test/aspect/using_transitive_dep/test_detect_using_transitive_impl_dep.py index 3e723498..fb9c00bd 100644 --- a/test/aspect/using_transitive_dep/test_detect_using_transitive_impl_dep.py +++ b/test/aspect/using_transitive_dep/test_detect_using_transitive_impl_dep.py @@ -1,3 +1,5 @@ +from pathlib import Path + from result import ExpectedResult, Result from test_case import TestCaseBase @@ -7,7 +9,7 @@ def execute_test_logic(self) -> Result: expected = ExpectedResult( success=False, invalid_includes=[ - "File='using_transitive_dep/transitive_usage_through_impl_deps.h', include='using_transitive_dep/foo.h'" + f"File='{Path('using_transitive_dep/transitive_usage_through_impl_deps.h')}', include='using_transitive_dep/foo.h'" ], ) actual = self._run_dwyu(