Skip to content

Commit

Permalink
Merge pull request #1795 from Autodesk/t_gamaj/fix_unit_tests
Browse files Browse the repository at this point in the history
Make sure test runner does not import itself
  • Loading branch information
seando-adsk authored Oct 29, 2021
2 parents 30e0ef2 + 6565804 commit ae24139
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmake/test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ except Exception:\\n\
\")")
set(COMMAND_CALL ${MAYA_EXECUTABLE} -c ${MEL_PY_EXEC_COMMAND})
else()
set(SCRIPT ${CMAKE_BINARY_DIR}/test/Temporary/scripts/${test_name}.py)
set(SCRIPT ${CMAKE_BINARY_DIR}/test/Temporary/scripts/runner_${test_name}.py)
FILE(WRITE ${SCRIPT} "${PREFIX_PYTHON_SCRIPT}")
set(COMMAND_CALL ${MAYA_PY_EXECUTABLE} ${SCRIPT})
endif()
Expand All @@ -170,7 +170,7 @@ finally:
)
endif()

set(SCRIPT ${CMAKE_BINARY_DIR}/test/Temporary/scripts/${test_name}.py)
set(SCRIPT ${CMAKE_BINARY_DIR}/test/Temporary/scripts/runner_${test_name}.py)
FILE(WRITE ${SCRIPT} "${PYTEST_CODE}")
set(COMMAND_CALL ${MAYA_PY_EXECUTABLE} ${SCRIPT})
endif()
Expand Down

0 comments on commit ae24139

Please sign in to comment.