code: def testScan(self):
      size = self.COMM.Get_size()
      rank = self.COMM.Get_rank()
      # --
      sscan = self.COMM.scan(size, op=MPI.SUM)
      self.assertEqual(sscan, cumsum([size] * (rank + 1)))
      # --
      rscan = self.COMM.scan(rank, op=MPI.SUM)
      self.assertEqual(rscan, cumsum(range(rank + 1)))
      # --
      minloc = self.COMM.scan((rank, rank), op=MPI.MINLOC)
      maxloc = self.COMM.scan((rank, rank), op=MPI.MAXLOC)
      self.assertEqual(minloc, (0, 0))
      self.assertEqual(maxloc, (rank, rank))
      # --
      if MPI.REPLACE != MPI.OP_NULL:
          rscan = self.COMM.scan(rank, op=MPI.REPLACE)
          self.assertEqual(rscan, rank)
      # --
      if MPI.NO_OP != MPI.OP_NULL:
          rscan = self.COMM.scan(rank, op=MPI.NO_OP)
          self.assertEqual(rscan, 0)
  
imports: from mpi4py import MPI
  import mpiunittest
  from functools import reduce
label_desc: Use image node_id 9 for calling the BaseTestCCOObj obj's underlying member method code with example usage: obj.testScan() without return types