Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs #10904. Python tests for PeakShape.
Also fix GCC and Windows warnings
- Loading branch information
1 parent
5612143
commit 8996ec6
Showing
9 changed files
with
36 additions
and
4 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
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
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
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
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
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
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
17 changes: 17 additions & 0 deletions
17
Code/Mantid/Framework/PythonInterface/test/python/mantid/geometry/PeakShapeTest.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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import unittest | ||
from mantid.simpleapi import CreatePeaksWorkspace, CreateSampleWorkspace | ||
from mantid.geometry import PeakShape | ||
|
||
class PeakShapeTest(unittest.TestCase): | ||
|
||
def test_basic_access(self): | ||
sampleWs = CreateSampleWorkspace() | ||
ws = CreatePeaksWorkspace(InstrumentWorkspace=sampleWs,NumberOfPeaks=1) | ||
peak = ws.getPeak(0) | ||
peak_shape = peak.getPeakShape() | ||
self.assertTrue(isinstance(peak_shape, PeakShape)) | ||
self.assertEquals(peak_shape.shapeName(), "none") | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |
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