Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refs #11418. Added failing test for PyExec
Imported code from other branch for parsing.
- Loading branch information
Michael Wedel
committed
Mar 24, 2015
1 parent
5f1af07
commit fd01484
Showing
2 changed files
with
147 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...ntid/Framework/PythonInterface/test/python/plugins/algorithms/PoldiLoadCrystalDataTest.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,39 @@ | ||
import unittest | ||
from testhelpers import assertRaisesNothing | ||
from testhelpers.tempfile_wrapper import TemporaryFileHelper | ||
|
||
from tempfile import NamedTemporaryFile | ||
|
||
from mantid.kernel import * | ||
from mantid.api import * | ||
from mantid.simpleapi import * | ||
|
||
import os | ||
|
||
|
||
class PoldiLoadCrystalDataTest(unittest.TestCase): | ||
testname = None | ||
|
||
def __init__(self, *args): | ||
unittest.TestCase.__init__(self, *args) | ||
|
||
def test_Init(self): | ||
assertRaisesNothing(self, AlgorithmManager.create, ("PoldiLoadCrystalData")) | ||
|
||
def test_FileOneCompoundOneAtom(self): | ||
fileHelper = TemporaryFileHelper("""Compound Silicon 1.0 0.01 { | ||
Lattice: 5.43 5.43 5.43 90.0 90.0 90.0 | ||
Spacegroup: F d -3 m | ||
Atoms: { | ||
Si 0 0 0 1.0 0.05 | ||
} | ||
}""") | ||
|
||
ws = PoldiLoadCrystalData(fileHelper.getName(), 0.75, 10.0) | ||
|
||
self.assertEquals(ws.rowCount(), 18) | ||
|
||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |