<commit_before>if(CMAKE_VERSION VERSION_LESS 2.8)
    message("CMake version greater than 2.8 necessary to run tests")
else()
    if(NOT CTEST_TESTING_TIMEOUT)
        set(CTEST_TESTING_TIMEOUT 60)
    endif()

   if(WIN32)
        set(TEST_PYTHONPATH     "${CMAKE_BINARY_DIR};${CMAKE_SOURCE_DIR}/tests/util;${testbinding_BINARY_DIR};$ENV{PYTHONPATH}")
        set(TEST_LIBRARY_PATH   "${libpyside_BINARY_DIR};${pysidetest_BINARY_DIR};${SHIBOKEN_INCLUDE_DIR}/../../bin;$ENV{PATH}")
        set(LIBRARY_PATH_VAR    "PATH")
        string(REPLACE "\\" "/" TEST_PYTHONPATH "${TEST_PYTHONPATH}")
        string(REPLACE "\\" "/" TEST_LIBRARY_PATH "${TEST_LIBRARY_PATH}")

        string(REPLACE ";" "\\;" TEST_PYTHONPATH "${TEST_PYTHONPATH}")
        string(REPLACE ";" "\\;" TEST_LIBRARY_PATH "${TEST_LIBRARY_PATH}")
    else()
        set(TEST_PYTHONPATH     "${CMAKE_BINARY_DIR}:${CMAKE_SOURCE_DIR}/tests/util:${testbinding_BINARY_DIR}:$ENV{PYTHONPATH}")
        set(TEST_LIBRARY_PATH   "${libpyside_BINARY_DIR}:${pysidetest_BINARY_DIR}:$ENV{LD_LIBRARY_PATH}")
        set(LIBRARY_PATH_VAR    "LD_LIBRARY_PATH")
    endif()


    macro(TEST_QT_MODULE var name)
      if(NOT DISABLE_${name} AND ${var})
          add_subdirectory(${name})
      endif()
    endmacro()

    macro(PYSIDE_TEST)
        string(REGEX MATCH "/([^/]+)//?([^/]+)\\.py" foo "${CMAKE_CURRENT_SOURCE_DIR}/${ARGV0}" )
        set(TEST_NAME "${CMAKE_MATCH_1}_${CMAKE_MATCH_2}")
        if (${ARGC} EQUAL 1)
            set(EXPECT_TO_FAIL 0)<commit_msg>Set up PYTHONPATH for tests correctly<commit_after>if(CMAKE_VERSION VERSION_LESS 2.8)
    message("CMake version greater than 2.8 necessary to run tests")
else()
    if(NOT CTEST_TESTING_TIMEOUT)
        set(CTEST_TESTING_TIMEOUT 60)
    endif()

   if(WIN32)
        set(TEST_PYTHONPATH     "${CMAKE_BINARY_DIR};${CMAKE_SOURCE_DIR}/tests/util;${pysidetest_BINARY_DIR};$ENV{PYTHONPATH}")
        set(TEST_LIBRARY_PATH   "${libpyside_BINARY_DIR};${pysidetest_BINARY_DIR};${SHIBOKEN_INCLUDE_DIR}/../../bin;$ENV{PATH}")
        set(LIBRARY_PATH_VAR    "PATH")
        string(REPLACE "\\" "/" TEST_PYTHONPATH "${TEST_PYTHONPATH}")
        string(REPLACE "\\" "/" TEST_LIBRARY_PATH "${TEST_LIBRARY_PATH}")

        string(REPLACE ";" "\\;" TEST_PYTHONPATH "${TEST_PYTHONPATH}")
        string(REPLACE ";" "\\;" TEST_LIBRARY_PATH "${TEST_LIBRARY_PATH}")
    else()
        set(TEST_PYTHONPATH     "${CMAKE_BINARY_DIR}:${CMAKE_SOURCE_DIR}/tests/util:${pysidetest_BINARY_DIR}:$ENV{PYTHONPATH}")
        set(TEST_LIBRARY_PATH   "${libpyside_BINARY_DIR}:${pysidetest_BINARY_DIR}:$ENV{LD_LIBRARY_PATH}")
        set(LIBRARY_PATH_VAR    "LD_LIBRARY_PATH")
    endif()


    macro(TEST_QT_MODULE var name)
      if(NOT DISABLE_${name} AND ${var})
          add_subdirectory(${name})
      endif()
    endmacro()

    macro(PYSIDE_TEST)
        string(REGEX MATCH "/([^/]+)//?([^/]+)\\.py" foo "${CMAKE_CURRENT_SOURCE_DIR}/${ARGV0}" )
        set(TEST_NAME "${CMAKE_MATCH_1}_${CMAKE_MATCH_2}")
        if (${ARGC} EQUAL 1)
            set(EXPECT_TO_FAIL 0)
{'fraction_non_alphanumeric': 0.16067929457870672, 'fraction_numerical': 0.008491182233834096, 'mean_word_length': 3.846518987341772, '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': '4186747', 'n_tokens_mistral': 1216, 'n_tokens_neox': 1164, 'n_words': 142}