Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mention other platforms in 'pytest/pytest-cov not found' warning #337

Merged
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
10 changes: 6 additions & 4 deletions ament_cmake_pytest/cmake/ament_add_pytest_test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ function(ament_add_pytest_test testname path)
ament_has_pytest(has_pytest QUIET PYTHON_EXECUTABLE "${ARG_PYTHON_EXECUTABLE}")
if(NOT has_pytest)
message(WARNING
"The Python module 'pytest' was not found, pytests can not be run (e.g. "
"on Ubuntu/Debian install the package 'python3-pytest')")
"The Python module 'pytest' was not found, pytests cannot be run. "
"On Linux, install the 'python3-pytest' package. "
"On other platforms, install 'pytest' using pip.")
return()
endif()

Expand Down Expand Up @@ -115,8 +116,9 @@ function(ament_add_pytest_test testname path)
)
if(NOT pytest_cov_version)
message(WARNING
"The Python module 'pytest-cov' was not found, test coverage will not be produced "
"(e.g. on Ubuntu/Debian install the package 'python3-pytest-cov')")
"The Python module 'pytest-cov' was not found, test coverage will not be produced. "
"On Linux, install the 'python3-pytest-cov' package. "
"On other platforms, install 'pytest-cov' using pip.")
else()
set(coverage_directory "${CMAKE_CURRENT_BINARY_DIR}/pytest_cov/${testname}")
file(MAKE_DIRECTORY "${coverage_directory}")
Expand Down