From 88aef756581a51834c90412f76a954f4022ec1f2 Mon Sep 17 00:00:00 2001 From: Jose Borreguero <borreguero@gmail.com> Date: Thu, 18 Mar 2021 12:08:25 -0400 Subject: [PATCH] Refs #30887 fix failing systemtest and doctest Signed-off-by: Jose Borreguero <borreguero@gmail.com> --- .../tests/framework/ISIS_WISHSingleCrystalReduction.py | 3 ++- docs/source/algorithms/AddPeakHKL-v1.rst | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Testing/SystemTests/tests/framework/ISIS_WISHSingleCrystalReduction.py b/Testing/SystemTests/tests/framework/ISIS_WISHSingleCrystalReduction.py index fbe9f1ba098..0b9bf0c65be 100644 --- a/Testing/SystemTests/tests/framework/ISIS_WISHSingleCrystalReduction.py +++ b/Testing/SystemTests/tests/framework/ISIS_WISHSingleCrystalReduction.py @@ -64,7 +64,8 @@ class WISHSingleCrystalPeakPredictionTest(MantidSystemTest): BasicPeak = namedtuple('Peak', ('DetID', 'BankName', 'h', 'k', 'l')) expected = BasicPeak(DetID=9202086, BankName='WISHpanel09', h=-5.0, k=-1.0, l=-7.0) expected_peak_found = False - for i in self._filtered.rowCount(): # iterate of the table representation of the PeaksWorkspace + peak_count = self._filtered.rowCount() + for i in range(peak_count): # iterate of the table representation of the PeaksWorkspace peak_row = self._filtered.row(i) peak = BasicPeak(**{k: peak_row[k] for k in BasicPeak._fields}) if peak == expected: diff --git a/docs/source/algorithms/AddPeakHKL-v1.rst b/docs/source/algorithms/AddPeakHKL-v1.rst index 136d704e15a..f9725135d48 100644 --- a/docs/source/algorithms/AddPeakHKL-v1.rst +++ b/docs/source/algorithms/AddPeakHKL-v1.rst @@ -47,7 +47,7 @@ Usage print('Peak wavelength {}'.format(round(peak['Wavelength'], 4))) print('Peak detector id {}'.format(peak['DetID'])) print('Peak run number {}'.format(peak['RunNumber'])) - print('Peak HKL [{},{},{}]'.format(peak['h'], peak['k'], peak['l'])) + print('Peak HKL [{},{},{}]'.format(int(peak['h']), int(peak['k']), int(peak['l']))) Output: -- GitLab