path_utils behaves differently depending on how it is executed. Therefore unit tests are not important, it's all about integration tests.
flowchart TD
User(["π¨βπ» User"])
subgraph python_lib
subgraph src
path_utils["π¦ path_utils.py"]
end
subgraph test
subgraph same_module
run_path_utils["π§ python_basics_as_a_binary
(simulates py_binary usage)"]
test_path_utils["π§ python_basics_as_a_test
(simulates py_test usage)"]
actual_test["π§ TODO
(sh_test?)"]
end
subgraph different_module
run_path_utils2["π§ python_basics_as_an_external_binary
(simulates py_binary usage)"]
test_path_utils2["π§ python_basics_as_an_external_test
(simulates py_test usage)"]
actual_test2["π§ TODO
(sh_test?)"]
end
end
end
run_path_utils -->|imports| path_utils
test_path_utils -->|imports| path_utils
actual_test -->|βΆοΈ bazel run| run_path_utils
actual_test -->|π bazel-bin/run_path_utils | run_path_utils
actual_test -->|π§ͺ bazel test| test_path_utils
run_path_utils2 -->|imports| path_utils
test_path_utils2 -->|imports| path_utils
actual_test2 -->|βΆοΈ bazel run| run_path_utils2
actual_test2 -->|π bazel-bin/run_path_utils | run_path_utils2
actual_test2 -->|π§ͺ bazel test| test_path_utils2
User -->|π§ͺ bazel test| actual_test
User -->|π§ͺ cd different_module && bazel test| actual_test2