Skip to content

Commit

Permalink
refs #6667 last attempt to give proper path to test modules
Browse files Browse the repository at this point in the history
  • Loading branch information
abuts committed Jul 5, 2013
1 parent dbeb44a commit 8090379
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
9 changes: 4 additions & 5 deletions Code/Mantid/scripts/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
set ( TEST_PY_FILES
test/ReducerTest.py
# test/DgreduceTest.py
#test/DirectEnergyConversionTest.py
test/DgreduceTest.py
test/DirectEnergyConversionTest.py
)

# python unit tests
if (PYUNITTEST_FOUND)
pyunittest_add_test ( ${CMAKE_CURRENT_SOURCE_DIR}/test PythonScriptsTest ${TEST_PY_FILES} )
# Trying to add tested modules to python system path

set (ENV{PYTHONPATH} "ENV{PYTHONPATH} ${CMAKE_CURRENT_SOURCE_DIR}/Inelastic" )
# Trying to add tested modules to python system path
#set (ENV{PYTHONPATH} "ENV{PYTHONPATH} ${CMAKE_CURRENT_SOURCE_DIR}/Inelastic" )
endif ()

# Ensure we don't get stale pyc files around
Expand Down
6 changes: 5 additions & 1 deletion Code/Mantid/scripts/test/DgreduceTest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import dgreduce
import unittest
import os, sys
lib_path = os.path.abspath('../Inelastic')
sys.path.append(lib_path)
import dgreduce



class DgreduceTest(unittest.TestCase):
Expand Down
6 changes: 5 additions & 1 deletion Code/Mantid/scripts/test/DirectEnergyConversionTest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import DirectEnergyConversion
import unittest
import os, sys
lib_path = os.path.abspath('../Inelastic')
sys.path.append(lib_path)
import DirectEnergyConversion


#-----------------------------------------------------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 8090379

Please sign in to comment.