From d32c5253020b1ed36a20a2cee21e39d0e55b675d Mon Sep 17 00:00:00 2001 From: Brandon Hewer <brandon.hewer@stfc.ac.uk> Date: Thu, 5 Oct 2017 15:53:34 +0100 Subject: [PATCH] Remove all doctest errors Refs #20818 --- docs/source/algorithms/RemovePromptPulse-v1.rst | 8 ++++---- docs/source/algorithms/RenameWorkspace-v1.rst | 2 +- docs/source/algorithms/SANSBeamFluxCorrection-v1.rst | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/source/algorithms/RemovePromptPulse-v1.rst b/docs/source/algorithms/RemovePromptPulse-v1.rst index eadf4e1a6ed..ed8ebe3780d 100644 --- a/docs/source/algorithms/RemovePromptPulse-v1.rst +++ b/docs/source/algorithms/RemovePromptPulse-v1.rst @@ -31,10 +31,10 @@ Usage x=w1.dataX(0) y=w1.dataY(0) - print("Y( {} ) = {}".format(x[100], y[100]) - print("Y( {} ) = {}".format(x[1000], y[1000]) - print("Y( {} ) = {}".format(x[4100], y[4100]) - print("Y( {} ) = {}".format(x[5000], y[5000]) + print("Y( {} ) = {}".format(x[100], y[100])) + print("Y( {} ) = {}".format(x[1000], y[1000])) + print("Y( {} ) = {}".format(x[4100], y[4100])) + print("Y( {} ) = {}".format(x[5000], y[5000])) .. testcleanup:: RemovePromptPulse diff --git a/docs/source/algorithms/RenameWorkspace-v1.rst b/docs/source/algorithms/RenameWorkspace-v1.rst index 1136c8eef40..4efabee829b 100644 --- a/docs/source/algorithms/RenameWorkspace-v1.rst +++ b/docs/source/algorithms/RenameWorkspace-v1.rst @@ -56,7 +56,7 @@ Usage obj_inADS.sort() print("{0:20}|{1:>6}| With Names: |{2:>20}|{3:>20}|".format("Exist in ADS: ",len(obj_inADS),obj_inADS[0],obj_inADS[1])) - print("Old pointer to myWs refers to workspace with new name: ".format(myWs.name())) + print("Old pointer to myWs refers to workspace with new name: {}".format(myWs.name())) print("*********************************************************************") print("***** After renaming workspace and monitors workspace together:") # diff --git a/docs/source/algorithms/SANSBeamFluxCorrection-v1.rst b/docs/source/algorithms/SANSBeamFluxCorrection-v1.rst index d6b6e400cc7..8baca75e747 100644 --- a/docs/source/algorithms/SANSBeamFluxCorrection-v1.rst +++ b/docs/source/algorithms/SANSBeamFluxCorrection-v1.rst @@ -41,8 +41,8 @@ Usage # Do the correction, dragging in the file which contains the reference flux spectrum. corrected = SANSBeamFluxCorrection(ws, InputMonitorWorkspace=monitor, ReferenceFluxFilename="SANSBeamFluxCorrectionMonitor.nxs") - print "The expected value of each bin should be %s." % (0.1/(49152*0.1)/(49152*0.1)) - print "The actual value of the first bin is %s." % corrected[0].readY(0)[0] + print("The expected value of each bin should be {}.".format((0.1/(49152*0.1)/(49152*0.1)))) + print("The actual value of the first bin is {}.".format(corrected[0].readY(0)[0])) Output: -- GitLab