def main():
    n = 10
    cmd = "from timestream.parse import guess_manifest_info;"
    cmd += "from sys import argv; guess_manifest_info(argv[1])"
    time = timeit.timeit(cmd, number=n) / float(n)
    print("guess_manifest_info took {}s per iteration".format(time))
    json.dump(ts_guess_manifest(argv[1]), stdout, indent=2)
Esempio n. 2
0
 def test_trailing_slash(self):
     got = ts_guess_manifest(helpers.FILES["timestream_manifold"] + os.sep)
     self.assertTrue(isinstance(got, dict))
     self.assertDictEqual(got, self.expect_good)
Esempio n. 3
0
 def test_trailing_slash(self):
     got = ts_guess_manifest(helpers.FILES["timestream"] + os.sep)
     self.assertTrue(isinstance(got, dict))
     self.assertDictEqual(got, helpers.TS_DICT)
Esempio n. 4
0
 def test_good_ts(self):
     got = ts_guess_manifest(helpers.FILES["timestream_manifold"])
     self.assertTrue(isinstance(got, dict))
     self.assertDictEqual(got, self.expect_good)
Esempio n. 5
0
 def test_good_ts(self):
     got = ts_guess_manifest(helpers.FILES["timestream"])
     self.assertTrue(isinstance(got, dict))
     self.assertDictEqual(got, helpers.TS_DICT)