diff --git a/Tests/Functional/Python/PyFit/CMakeLists.txt b/Tests/Functional/Python/PyFit/CMakeLists.txt
index 23cf08b436aea0e166e7c72c0c748bf27edb1e7a..81bed49f6c36ba321380085defc919750db1ee14 100644
--- a/Tests/Functional/Python/PyFit/CMakeLists.txt
+++ b/Tests/Functional/Python/PyFit/CMakeLists.txt
@@ -2,7 +2,7 @@
 # Tests/Functional/PyFit/CMakeLists.txt
 ############################################################################
 
-set(output_dir ${TEST_OUTPUT_DIR}/Functional/Python/PyFit)
+set(output_dir ${TEST_OUTPUT_DIR_PY_FIT})
 file(MAKE_DIRECTORY ${output_dir})
 
 file(GLOB sources RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.py")
diff --git a/Tests/Functional/Python/PyPersistence/CMakeLists.txt b/Tests/Functional/Python/PyPersistence/CMakeLists.txt
index db85f10cc11b671b83ed4d7f9e87cc71d36240f7..ab5092989edeedce6b290d57417a5d20812ce072 100644
--- a/Tests/Functional/Python/PyPersistence/CMakeLists.txt
+++ b/Tests/Functional/Python/PyPersistence/CMakeLists.txt
@@ -2,7 +2,7 @@
 # Tests/Functional/PyCore/persistence/CMakeLists.txt
 ############################################################################
 
-set(OUTPUT_DIR ${TEST_OUTPUT_DIR_PY_PERSIST}/PyPersist)
+set(OUTPUT_DIR ${TEST_OUTPUT_DIR_PY_PERSIST})
 file(MAKE_DIRECTORY ${OUTPUT_DIR})
 
 set(PYPERSIST_REFERENCE_DIR ${TEST_REFERENCE_DIR}/Python)
diff --git a/cmake/BornAgain/Directories.cmake b/cmake/BornAgain/Directories.cmake
index 8eab1b847e5b5c3576888c1651ec306b58327a28..b72823621cdfcb97cccf54d8671dd361a072f8a2 100644
--- a/cmake/BornAgain/Directories.cmake
+++ b/cmake/BornAgain/Directories.cmake
@@ -31,6 +31,7 @@ set(TEST_OUTPUT_DIR ${CMAKE_BINARY_DIR}/test_output)
 set(TEST_OUTPUT_DIR_CORE ${CMAKE_BINARY_DIR}/test_output/Core)
 set(TEST_OUTPUT_DIR_PY_EXAMPLES ${CMAKE_BINARY_DIR}/test_output/PyExamples)
 set(TEST_OUTPUT_DIR_PY_CORE ${CMAKE_BINARY_DIR}/test_output/PyCore)
+set(TEST_OUTPUT_DIR_PY_FIT ${CMAKE_BINARY_DIR}/test_output/PyFit)
 set(TEST_OUTPUT_DIR_PY_PERSIST ${CMAKE_BINARY_DIR}/test_output/PyPersist)
 set(TEST_OUTPUT_DIR_PY_STD ${CMAKE_BINARY_DIR}/test_output/PyStd)
 set(TEST_OUTPUT_DIR_STD ${CMAKE_BINARY_DIR}/test_output/Std)