Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
6d252e62
Commit
6d252e62
authored
14 years ago
by
Peterson, Peter
Browse files
Options
Downloads
Patches
Plain Diff
First set of python tests. Refs #1881.
parent
f7ef059c
Branches
add_pycharm_environment_file
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Mantid/Framework/PythonAPI/CMakeLists.txt
+9
-3
9 additions, 3 deletions
Code/Mantid/Framework/PythonAPI/CMakeLists.txt
Code/Mantid/Framework/PythonAPI/test/ImportTest.py
+6
-0
6 additions, 0 deletions
Code/Mantid/Framework/PythonAPI/test/ImportTest.py
with
15 additions
and
3 deletions
Code/Mantid/Framework/PythonAPI/CMakeLists.txt
+
9
−
3
View file @
6d252e62
...
...
@@ -18,6 +18,8 @@ set ( INC_FILES inc/MantidPythonAPI/api_exports.h
set
(
TEST_FILES test/PythonFrameworkTests.h
test/SimplePythonAPITest.h
)
set
(
TEST_PY_FILES test/ImportTest.py
)
# Add local dependencies
set
(
Boost_USE_DEBUG_PYTHON TRUE
)
find_package
(
Boost REQUIRED python
)
...
...
@@ -66,9 +68,6 @@ foreach ( PYFILE ${PYTHON_INSTALL_FILES} )
)
endforeach
(
PYFILE
${
PYTHON_INSTALL_FILES
}
)
add_test
(
NAME PythonAPITest_import
COMMAND
${
CMAKE_COMMAND
}
-E chdir
"
${
CMAKE_BINARY_DIR
}
/bin"
${
PYTHON_EXECUTABLE
}
-c
"from MantidFramework import mtd"
)
if
(
CXXTEST_FOUND
)
include_directories
(
../DataHandling/inc ../DataObjects/inc ../TestHelpers/inc
)
cxxtest_add_test
(
PythonAPITest
${
TEST_FILES
}
)
...
...
@@ -77,3 +76,10 @@ if ( CXXTEST_FOUND )
# Add to the 'FrameworkTests' group in VS
set_property
(
TARGET PythonAPITest PROPERTY FOLDER
"FrameworkTests"
)
endif
()
# python unit tests
if
(
PYUNITTEST_FOUND
)
pyunittest_add_test
(
VanillaPythonTest.py
${
TEST_PY_FILES
}
)
add_dependencies
(
VanillaPythonTest.py PythonAPI
)
add_dependencies
(
FrameworkTests VanillaPythonTest.py
)
endif
()
This diff is collapsed.
Click to expand it.
Code/Mantid/Framework/PythonAPI/test/ImportTest.py
0 → 100644
+
6
−
0
View file @
6d252e62
import
unittest
class
ImportTest
(
unittest
.
TestCase
):
def
test_import
(
self
):
from
MantidFramework
import
mtd
mtd
.
initialise
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment