<commit_before>SET(PYTHON_TESTS
    test_property_tree_wrappers
    test_energy_storage_device_wrappers
    test_end_criterion
    test_time_evolution
    test_stage
    test_charge_discharge
    test_voltammetry
    test_ragone_plot
    test_impedance_spectroscopy
)

FUNCTION(ADD_CAP_PYTHON_TEST TEST_NAME)
    ADD_CUSTOM_COMMAND(
        OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME}.py
        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${TEST_NAME}.py
        COMMAND ${CMAKE_COMMAND}
        ARGS -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${TEST_NAME}.py ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME}.py
        COMMENT "Copying ${TEST_NAME}.py"
    )
    ADD_CUSTOM_TARGET(
        ${TEST_NAME}.py ALL
        DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME}.py
    )
    ADD_TEST(
        NAME ${TEST_NAME}_py
        COMMAND ${PYTHON_EXECUTABLE} ${TEST_NAME}.py
    )
ENDFUNCTION()

FOREACH(TEST_NAME ${PYTHON_TESTS})
    ADD_CAP_PYTHON_TEST(${TEST_NAME})
    SET_TESTS_PROPERTIES(${TEST_NAME}_py PROPERTIES
        ENVIRONMENT "PYTHONPATH=${CMAKE_BINARY_DIR}/python")
ENDFOREACH()<commit_msg>Do not override PYTHONPATH when running the python test.<commit_after>SET(PYTHON_TESTS
    test_property_tree_wrappers
    test_energy_storage_device_wrappers
    test_end_criterion
    test_time_evolution
    test_stage
    test_charge_discharge
    test_voltammetry
    test_ragone_plot
    test_impedance_spectroscopy
)

FUNCTION(ADD_CAP_PYTHON_TEST TEST_NAME)
    ADD_CUSTOM_COMMAND(
        OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME}.py
        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${TEST_NAME}.py
        COMMAND ${CMAKE_COMMAND}
        ARGS -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${TEST_NAME}.py ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME}.py
        COMMENT "Copying ${TEST_NAME}.py"
    )
    ADD_CUSTOM_TARGET(
        ${TEST_NAME}.py ALL
        DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME}.py
    )
    ADD_TEST(
        NAME ${TEST_NAME}_py
        COMMAND ${PYTHON_EXECUTABLE} ${TEST_NAME}.py
    )
ENDFUNCTION()

FOREACH(TEST_NAME ${PYTHON_TESTS})
    ADD_CAP_PYTHON_TEST(${TEST_NAME})
    SET_TESTS_PROPERTIES(${TEST_NAME}_py PROPERTIES
        ENVIRONMENT "PYTHONPATH=${CMAKE_BINARY_DIR}/python:$ENV{PYTHONPATH}")
ENDFOREACH()
{'fraction_non_alphanumeric': 0.09453405017921147, 'fraction_numerical': 0.0, 'mean_word_length': 4.075, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3919904', 'n_tokens_mistral': 837, 'n_tokens_neox': 814, 'n_words': 101}