Skip to content

Commit

Permalink
Enable ShowPeakHKLOffset to work in python re #9726
Browse files Browse the repository at this point in the history
This required use of ITable instead of Table in algorithm and unit test for the output.

Signed-off-by: Karl Palmen <karl.palmen@stfc.ac.uk>
  • Loading branch information
KarlPalmen committed Aug 18, 2014
1 parent 8951927 commit bf67c21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/Crystal/src/ShowPeakHKLOffsets.cpp
Expand Up @@ -50,7 +50,7 @@ namespace Mantid
"Workspace of Peaks with UB loaded");

declareProperty(
new WorkspaceProperty<TableWorkspace>("HKLIntegerOffsets", "HKLIntegerOffsets",
new WorkspaceProperty<ITableWorkspace>("HKLIntegerOffsets", "HKLIntegerOffsets",
Direction::Output), "Workspace with the Results");
}

Expand Down
5 changes: 2 additions & 3 deletions Code/Mantid/Framework/Crystal/test/ShowPeakHKLOffsetsTest.h
Expand Up @@ -8,15 +8,14 @@
#ifndef SHOWPEAKHKLOFFSETSTEST_H_
#define SHOWPEAKHKLOFFSETSTEST_H_
#include <cxxtest/TestSuite.h>
#include "MantidAPI/ITableWorkspace.h"
#include "MantidCrystal/LoadIsawPeaks.h"
#include "MantidCrystal/LoadIsawUB.h"
#include "MantidCrystal/ShowPeakHKLOffsets.h"
#include "../../DataObjects/inc/MantidDataObjects/TableWorkspace.h"

using Mantid::Crystal::LoadIsawPeaks;
using Mantid::Crystal::LoadIsawUB;
using Mantid::Crystal::ShowPeakHKLOffsets;
using Mantid::DataObjects::TableWorkspace;


class ShowPeakHKLOffsetsTest: public CxxTest::TestSuite
Expand Down Expand Up @@ -48,7 +47,7 @@ class ShowPeakHKLOffsetsTest: public CxxTest::TestSuite
TS_ASSERT(show.execute())
TS_ASSERT(show.isExecuted())
show.setProperty("HKLIntegerOffsets","offsets");
boost::shared_ptr<TableWorkspace> Offsets= show.getProperty("HKLIntegerOffsets");
boost::shared_ptr<Mantid::API::ITableWorkspace> Offsets= show.getProperty("HKLIntegerOffsets");


TS_ASSERT_DELTA( Offsets->Double(3,1), 0.0186555,.1)
Expand Down

0 comments on commit bf67c21

Please sign in to comment.