def testPatternAtBufsize(self):
    old_size = searching.Grep.BUFF_SIZE
    try:
      searching.Grep.BUFF_SIZE = 10000

      filename = "/fs/os/c/Downloads/grepfile.txt"
      data = "X" * (searching.Grep.BUFF_SIZE - len("HIT")) + "HIT" + "X" * 1000
      self.CreateFile(filename, data)

      output_path = "analysis/grep"
      output_urn = self.client_id.Add(output_path)
      data_store.DB.DeleteSubject(output_urn, token=self.token)

      grepspec = rdf_client.BareGrepSpec(
          mode=rdf_client.GrepSpec.Mode.FIRST_HIT,
          literal="HIT")

      for _ in test_lib.TestFlowHelper(
          "SearchFileContent", self.client_mock, client_id=self.client_id,
          paths=["/c/Downloads/grepfile.txt"],
          pathtype=rdf_paths.PathSpec.PathType.OS,
          token=self.token, output=output_path, grep=grepspec):
        pass

      # Check the output file is created
      fd = aff4.FACTORY.Open(output_urn, token=self.token)
      self.assertEqual(len(fd), 1)
      self.assertEqual(fd[0].offset, len("HIT") - searching.Grep.BUFF_SIZE)
      self.assertEqual(fd[0].length, 23)

      self.DeleteFile(filename)
    finally:
      searching.Grep.BUFF_SIZE = old_size
dataset/ETHPy150Open google/grr/grr/lib/flows/general/grep_test.py/TestSearchFileContentWithFixture.testPatternAtBufsize/swapped operands of `-`