def test_get_path_mbt_u2_vers0(self): root = "/unittest/" path = get_path_mbt(root=root, usr=2, vers=0) self.assertEqual("/unittest/data/minute_based_table/u2_0.csv", path)
def test_get_path_mbt_default(self): path = get_path_mbt() assertPath = "{root}data/minute_based_table/u1.csv".format(root=root) self.assertEqual(assertPath, path)
def test_get_path_mbt_u1_versNone(self): root = "/unittest/" path = get_path_mbt(root=root, usr=1, vers=None) self.assertEqual("/unittest/data/minute_based_table/u1.csv", path)
def read_mbt(usr=1, vers=None): path = get_path_mbt(usr=usr, vers=vers) data = read_csv(path) return data