def test(self): tests = [ ("0", [0, 1, 3343, 9712, 9999]), ("1", [10000, 13188, 19999]), ("29", [290000, 296041, 298796, 299999]), ("30", [300000, 309384]), ] for (exp, job_ids) in tests: for job_id in job_ids: fmt_id = jstore.FormatJobID(job_id) self.assertEqual(jstore.GetArchiveDirectory(fmt_id), exp) self.assertEqual(jstore.ParseJobId(fmt_id), job_id)
def test(self): self.assertEqual(jstore.ParseJobId(29981), 29981) self.assertEqual(jstore.ParseJobId("12918"), 12918)