<commit_before>project(sprokit_test_python)

find_package(PythonInterp ${PYTHON_VERSION} REQUIRED)

set(sprokit_test_runner
  "${PYTHON_EXECUTABLE}")

function (sprokit_build_python_test group input)
  sprokit_configure_file(test-python-${group}
    "${CMAKE_CURRENT_SOURCE_DIR}/${input}"
    "${sprokit_test_output_path}/test-python-${group}"
    PYTHON_EXECUTABLE)

  sprokit_declare_tooled_test(python-${group})
endfunction ()

function (sprokit_add_python_test group instance)
  set(python_module_path
    "${sprokit_python_output_path}/${CMAKE_CFG_INTDIR}")
  set(python_chdir
    "${CMAKE_CFG_INTDIR}")

  sprokit_add_tooled_test(python-${group} ${instance}<commit_msg>Fix module paths on Windows for tests<commit_after>project(sprokit_test_python)

find_package(PythonInterp ${PYTHON_VERSION} REQUIRED)

set(sprokit_test_runner
  "${PYTHON_EXECUTABLE}")

function (sprokit_build_python_test group input)
  if (CMAKE_CONFIGURATION_TYPES)
    set(sprokit_configure_cmake_args
      "\"-Dconfig=${CMAKE_CFG_INTDIR}/\"")
  endif ()
  sprokit_configure_file(test-python-${group}
    "${CMAKE_CURRENT_SOURCE_DIR}/${input}"
    "${sprokit_test_output_path}/\${config}test-python-${group}"
    PYTHON_EXECUTABLE)

  sprokit_declare_tooled_test(python-${group})
endfunction ()

function (sprokit_add_python_test group instance)
  set(python_module_path
    "${sprokit_python_output_path}")
  set(python_chdir
    ".")

  if (CMAKE_CONFIGURATION_TYPES)
    set(python_module_path
      "${python_module_path}/$<CONFIGURATION>")
    set(python_chdir
      "$<CONFIGURATION>")
  endif ()

  sprokit_add_tooled_test(python-${group} ${instance}
{'fraction_non_alphanumeric': 0.12339645693341478, 'fraction_numerical': 0.0, 'mean_word_length': 6.726415094339623, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6328184', 'n_tokens_mistral': 619, 'n_tokens_neox': 614, 'n_words': 68}