def path_info_munge(filepath): """ Munge the path for this filetype """ return_path = un_abs_path(id2filename(int(filepath))) return return_path
def test_id2filename_shift_point(self): """test the correct creation of the shift point filename """ filename = id2filename((32 * 1024)) self.assertEqual(filename, '/00/8000')
def test_id2filename_o_shift_point(self): """test the correct creation of an over shift point filename """ filename = id2filename((32 * 1024) + 1) self.assertEqual(filename, '/01/8001')
def test_id2filename_u_shift_point(self): """test the correct creation of an under shift point filename """ filename = id2filename((32 * 1024) - 1) self.assertEqual(filename, '/ff/7fff')
def test_id2filename_simple(self): """test the correct creation of a simple filename """ filename = id2filename(1) self.assertEqual(filename, '/file.1')
def test_id2filename_zero(self): """test the correct creation of a zero filename """ filename = id2filename(0) self.assertEqual(filename, '/file.0')
def test_id2filename_negative(self): """test the correct creation of a negative filename """ filename = id2filename(-1) self.assertEqual(filename, '/file.-1')
def test_id2filename_basic(self): """test the correct creation of a basicfilename """ filename = id2filename(1234) self.assertEqual(filename, '/d2/4d2')