find_package(Python3 REQUIRED COMPONENTS Interpreter) set(args "${CMAKE_CURRENT_SOURCE_DIR}" --server-binary "$" --worker-binary "$" --client-binary "$" --project-version "${PROJECT_VERSION}") add_test(NAME python_tests COMMAND Python3::Interpreter -m pytest ${args} WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") add_test(NAME python_tests_valgrind COMMAND Python3::Interpreter -m pytest ${args} --valgrind-binary "${CMAKE_CURRENT_SOURCE_DIR}/../src/valgrind.sh" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")