def test_fix_missing_tgids(self): with contextlib.nested(open(ATRACE_EXTRACTED_TGIDS, 'r'), open(ATRACE_MISSING_TGIDS, 'r'), open(ATRACE_FIXED_TGIDS, 'r')) as (f1, f2, f3): atrace_data = f2.read() tgid_map = eval(f1.read()) fixed = f3.read() res = atrace_agent.fix_missing_tgids(atrace_data, tgid_map) self.assertEqual(res, fixed)
def test_fix_missing_tgids(self): with contextlib.nested(open(ATRACE_EXTRACTED_TGIDS, 'r'), open(ATRACE_MISSING_TGIDS, 'r'), open(ATRACE_FIXED_TGIDS, 'r')) as (f1, f2, f3): atrace_data = f2.read() tgid_map = eval(f1.read()) fixed = f3.read() res = atrace_agent.fix_missing_tgids(atrace_data, tgid_map) self.assertEqual(res, fixed)