Skip to content

Commit

Permalink
Fix C++ python object instantiator test. Refs #4399
Browse files Browse the repository at this point in the history
  • Loading branch information
martyngigg committed Apr 17, 2012
1 parent a5cc7a6 commit 4aa26ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,10 @@ def contains_newapi_algorithm(filename):
@returns True if a python algorithm written with the new API
has been found.
"""

file = open(filename,'r')
alg_found = True
for line in reversed(file.readlines()):
if 'mtd.registerPyAlgorithm' in line:
if 'registerPyAlgorithm' in line:
alg_found = False
break
file.close()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class PythonObjectInstantiatorTest: public CxxTest::TestSuite
//Assume this is where the mantid package is too
std::string code = "import sys\n"
"sys.path.append(r'" + propDir + "')\n"
"from mantid.api import PythonAlgorithm\n"
"from mantid import PythonAlgorithm\n"
"class PyAlg(PythonAlgorithm):\n"
" pass\n";
PyRun_SimpleString(code.c_str());
Expand Down

0 comments on commit 4aa26ec

Please sign in to comment.