From 42b40fc8bf7c4482c01496631fa84be54545adbf Mon Sep 17 00:00:00 2001
From: Harry Jeffery <henry.jeffery@stfc.ac.uk>
Date: Mon, 8 Jun 2015 10:14:38 +0100
Subject: [PATCH] Refs #12722 Update doc test to expose bug

---
 .../source/algorithms/GroupDetectors-v2.rst    | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/Code/Mantid/docs/source/algorithms/GroupDetectors-v2.rst b/Code/Mantid/docs/source/algorithms/GroupDetectors-v2.rst
index 158f8d15066..10340bed686 100644
--- a/Code/Mantid/docs/source/algorithms/GroupDetectors-v2.rst
+++ b/Code/Mantid/docs/source/algorithms/GroupDetectors-v2.rst
@@ -488,23 +488,27 @@ Output:
 
 .. testcode:: ExGroupDetectorsWithPattern
 
-   # Create Workspace of 5 spectra each with two entries.
-   ws = CreateWorkspace(DataX=[1,2], DataY=[11,12,21,22,31,32,41,42,51,52], NSpec=5)
+   # Create Workspace of 10 spectra each with one bin.
+   ws = CreateWorkspace(DataX=[1], DataY=[1,2,3,4,5,6,7,8,9,10], NSpec=10)
 
-   # Run algorithm adding first two spectra and then keeping last two spectra
-   ws2 = GroupDetectors(ws, GroupingPattern="0+1,3,4")
+   # Run algorithm adding first two spectra and then keep the fifth, and last three spectra
+   ws2 = GroupDetectors(ws, GroupingPattern="0+1,4,7:9")
 
    #print result
    print ws2.readY(0)
    print ws2.readY(1)
    print ws2.readY(2)
+   print ws2.readY(3)
+   print ws2.readY(4)
 
 Output:
 
 .. testoutput:: ExGroupDetectorsWithPattern
 
-   [ 32.  34.]
-   [ 41.  42.]
-   [ 51.  52.]
+   [ 3.]
+   [ 5.]
+   [ 8.]
+   [ 9.]
+   [ 10.]
 
 .. categories::
-- 
GitLab