prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Test result combination scripts can be removed
  ## Description
  
  We have a couple of scripts for combining test results in CI that are no longer being used and can be deleted:
  ```
  devops/scripts/combine-junit.py
  devops/scripts/combine-junit-test-results.sh
  ```
  
  
  </issue>
  <code>
  [start of devops/scripts/combine-junit.py]
  1 #!/usr/bin/env python
  2 #
  3 #  Corey Goldberg, Dec 2012
  4 #  Original source from gist.github.com/cgoldberg/4320815
  5 
  6 import os
  7 import sys
  8 import xml.etree.ElementTree as ET
  9 
  10 
  11 """Merge multiple JUnit XML files into a single results file.
  12 
  13 Output dumps to sdtdout.
  14 
  15 example usage:
  16     $ python merge_junit_results.py results1.xml results2.xml > results.xml
  17 """
  18 
  19 
  20 def main():
  21     args = sys.argv[1:]
  22     if not args:
  23         usage()
  24         sys.exit(2)
  25     if '-h' in args or '--help' in args:
  26         usage()
  27         sys.exit(2)
  28     merge_results(args[:])
  29 
  30 
  31 def merge_results(xml_files):
  32     failures = 0
  33     tests = 0
  34     errors = 0
  35     time = 0.0
  36     cases = []
  37 
  38     for file_name in xml_files:
  39         # We disable bandit checking to permit B314, which recommends use
  40         # of defusedxml to protect against malicious XML files. This code
  41         # path only runs in CI, not on developer workstations, and the XML
  42         # output is generated by testinfra on staging machines.
  43         tree = ET.parse(file_name)  # nosec
  44         test_suite = tree.getroot()
  45         failures += int(test_suite.attrib['failures'])
  46         tests += int(test_suite.attrib['tests'])
  47         errors += int(test_suite.attrib['errors'])
  48         time += float(test_suite.attrib['time'])
  49         cases.append(test_suite.getchildren())
  50 
  51     new_root = ET.Element('testsuite')
  52     new_root.attrib['failures'] = '%s' % failures
  53     new_root.attrib['tests'] = '%s' % tests
  54     new_root.attrib['errors'] = '%s' % errors
  55     new_root.attrib['time'] = '%s' % time
  56     for case in cases:
  57         new_root.extend(case)
  58     new_tree = ET.ElementTree(new_root)
  59     ET.dump(new_tree)
  60 
  61 
  62 def usage():
  63     this_file = os.path.basename(__file__)
  64     print('Usage:  %s results1.xml results2.xml' % this_file)
  65 
  66 
  67 if __name__ == '__main__':
  68     main()
  69
  [end of devops/scripts/combine-junit.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/devops/scripts/combine-junit.py b/devops/scripts/combine-junit.py
  deleted file mode 100755
  --- a/devops/scripts/combine-junit.py
  +++ /dev/null
  @@ -1,68 +0,0 @@
  -#!/usr/bin/env python
  -#
  -#  Corey Goldberg, Dec 2012
  -#  Original source from gist.github.com/cgoldberg/4320815
  -
  -import os
  -import sys
  -import xml.etree.ElementTree as ET
  -
  -
  -"""Merge multiple JUnit XML files into a single results file.
  -
  -Output dumps to sdtdout.
  -
  -example usage:
  -    $ python merge_junit_results.py results1.xml results2.xml > results.xml
  -"""
  -
  -
  -def main():
  -    args = sys.argv[1:]
  -    if not args:
  -        usage()
  -        sys.exit(2)
  -    if '-h' in args or '--help' in args:
  -        usage()
  -        sys.exit(2)
  -    merge_results(args[:])
  -
  -
  -def merge_results(xml_files):
  -    failures = 0
  -    tests = 0
  -    errors = 0
  -    time = 0.0
  -    cases = []
  -
  -    for file_name in xml_files:
  -        # We disable bandit checking to permit B314, which recommends use
  -        # of defusedxml to protect against malicious XML files. This code
  -        # path only runs in CI, not on developer workstations, and the XML
  -        # output is generated by testinfra on staging machines.
  -        tree = ET.parse(file_name)  # nosec
  -        test_suite = tree.getroot()
  -        failures += int(test_suite.attrib['failures'])
  -        tests += int(test_suite.attrib['tests'])
  -        errors += int(test_suite.attrib['errors'])
  -        time += float(test_suite.attrib['time'])
  -        cases.append(test_suite.getchildren())
  -
  -    new_root = ET.Element('testsuite')
  -    new_root.attrib['failures'] = '%s' % failures
  -    new_root.attrib['tests'] = '%s' % tests
  -    new_root.attrib['errors'] = '%s' % errors
  -    new_root.attrib['time'] = '%s' % time
  -    for case in cases:
  -        new_root.extend(case)
  -    new_tree = ET.ElementTree(new_root)
  -    ET.dump(new_tree)
  -
  -
  -def usage():
  -    this_file = os.path.basename(__file__)
  -    print('Usage:  %s results1.xml results2.xml' % this_file)
  -
  -
  -if __name__ == '__main__':
  -    main()
  
verification_info: {"golden_diff": "diff --git a/devops/scripts/combine-junit.py b/devops/scripts/combine-junit.py\ndeleted file mode 100755\n--- a/devops/scripts/combine-junit.py\n+++ /dev/null\n@@ -1,68 +0,0 @@\n-#!/usr/bin/env python\n-#\n-#  Corey Goldberg, Dec 2012\n-#  Original source from gist.github.com/cgoldberg/4320815\n-\n-import os\n-import sys\n-import xml.etree.ElementTree as ET\n-\n-\n-\"\"\"Merge multiple JUnit XML files into a single results file.\n-\n-Output dumps to sdtdout.\n-\n-example usage:\n-    $ python merge_junit_results.py results1.xml results2.xml > results.xml\n-\"\"\"\n-\n-\n-def main():\n-    args = sys.argv[1:]\n-    if not args:\n-        usage()\n-        sys.exit(2)\n-    if '-h' in args or '--help' in args:\n-        usage()\n-        sys.exit(2)\n-    merge_results(args[:])\n-\n-\n-def merge_results(xml_files):\n-    failures = 0\n-    tests = 0\n-    errors = 0\n-    time = 0.0\n-    cases = []\n-\n-    for file_name in xml_files:\n-        # We disable bandit checking to permit B314, which recommends use\n-        # of defusedxml to protect against malicious XML files. This code\n-        # path only runs in CI, not on developer workstations, and the XML\n-        # output is generated by testinfra on staging machines.\n-        tree = ET.parse(file_name)  # nosec\n-        test_suite = tree.getroot()\n-        failures += int(test_suite.attrib['failures'])\n-        tests += int(test_suite.attrib['tests'])\n-        errors += int(test_suite.attrib['errors'])\n-        time += float(test_suite.attrib['time'])\n-        cases.append(test_suite.getchildren())\n-\n-    new_root = ET.Element('testsuite')\n-    new_root.attrib['failures'] = '%s' % failures\n-    new_root.attrib['tests'] = '%s' % tests\n-    new_root.attrib['errors'] = '%s' % errors\n-    new_root.attrib['time'] = '%s' % time\n-    for case in cases:\n-        new_root.extend(case)\n-    new_tree = ET.ElementTree(new_root)\n-    ET.dump(new_tree)\n-\n-\n-def usage():\n-    this_file = os.path.basename(__file__)\n-    print('Usage:  %s results1.xml results2.xml' % this_file)\n-\n-\n-if __name__ == '__main__':\n-    main()\n", "issue": "Test result combination scripts can be removed\n## Description\r\n\r\nWe have a couple of scripts for combining test results in CI that are no longer being used and can be deleted:\r\n```\r\ndevops/scripts/combine-junit.py\r\ndevops/scripts/combine-junit-test-results.sh\r\n```\r\n\n", "before_files": [{"content": "#!/usr/bin/env python\n#\n#  Corey Goldberg, Dec 2012\n#  Original source from gist.github.com/cgoldberg/4320815\n\nimport os\nimport sys\nimport xml.etree.ElementTree as ET\n\n\n\"\"\"Merge multiple JUnit XML files into a single results file.\n\nOutput dumps to sdtdout.\n\nexample usage:\n    $ python merge_junit_results.py results1.xml results2.xml > results.xml\n\"\"\"\n\n\ndef main():\n    args = sys.argv[1:]\n    if not args:\n        usage()\n        sys.exit(2)\n    if '-h' in args or '--help' in args:\n        usage()\n        sys.exit(2)\n    merge_results(args[:])\n\n\ndef merge_results(xml_files):\n    failures = 0\n    tests = 0\n    errors = 0\n    time = 0.0\n    cases = []\n\n    for file_name in xml_files:\n        # We disable bandit checking to permit B314, which recommends use\n        # of defusedxml to protect against malicious XML files. This code\n        # path only runs in CI, not on developer workstations, and the XML\n        # output is generated by testinfra on staging machines.\n        tree = ET.parse(file_name)  # nosec\n        test_suite = tree.getroot()\n        failures += int(test_suite.attrib['failures'])\n        tests += int(test_suite.attrib['tests'])\n        errors += int(test_suite.attrib['errors'])\n        time += float(test_suite.attrib['time'])\n        cases.append(test_suite.getchildren())\n\n    new_root = ET.Element('testsuite')\n    new_root.attrib['failures'] = '%s' % failures\n    new_root.attrib['tests'] = '%s' % tests\n    new_root.attrib['errors'] = '%s' % errors\n    new_root.attrib['time'] = '%s' % time\n    for case in cases:\n        new_root.extend(case)\n    new_tree = ET.ElementTree(new_root)\n    ET.dump(new_tree)\n\n\ndef usage():\n    this_file = os.path.basename(__file__)\n    print('Usage:  %s results1.xml results2.xml' % this_file)\n\n\nif __name__ == '__main__':\n    main()\n", "path": "devops/scripts/combine-junit.py"}]}