Exemplo n.º 1
0
  def test_extract_tgids(self):
    with contextlib.nested(open(ATRACE_PROCFS_DUMP, 'r'),
                           open(ATRACE_EXTRACTED_TGIDS, 'r')) as (f1, f2):

      atrace_procfs_dump = f1.read()
      atrace_procfs_extracted = f2.read()

      tgids = eval(atrace_procfs_extracted)
      result = atrace_agent.extract_tgids(atrace_procfs_dump)

      self.assertEqual(result, tgids)
Exemplo n.º 2
0
    def test_extract_tgids(self):
        with contextlib.nested(open(ATRACE_PROCFS_DUMP, 'r'),
                               open(ATRACE_EXTRACTED_TGIDS, 'r')) as (f1, f2):

            atrace_procfs_dump = f1.read()
            atrace_procfs_extracted = f2.read()

            tgids = eval(atrace_procfs_extracted)
            result = atrace_agent.extract_tgids(atrace_procfs_dump)

            self.assertEqual(result, tgids)