'Test pretty file size'

def test_pretty_file_size(self):

    test_cases = {None: u'0.00    B', u'': u'0.00    B', u'1024': u'1.00    KB', u'1024.5': u'1.00    KB', (-42.5): u'0.00    B', (-42): u'0.00    B', 0: u'0.00    B', 25: u'25.00    B', 25.5: u'25.50    B', (2 ** 10): u'1.00    KB', ((50 * (2 ** 10)) + 25): u'50.02    KB', (2 ** 20): u'1.00    MB', (((100 * (2 ** 20)) + (50 * (2 ** 10))) + 25): u'100.05    MB', (2 ** 30): u'1.00    GB', ((((200 * (2 ** 30)) + (100 * (2 ** 20))) + (50 * (2 ** 10))) + 25): u'200.10    GB', (2 ** 40): u'1.00    TB', (((((400 * (2 ** 40)) + (200 * (2 ** 30))) + (100 * (2 ** 20))) + (50 * (2 ** 10))) + 25): u'400.20    TB', (2 ** 50): u'1.00    PB', ((((((800 * (2 ** 50)) + (400 * (2 ** 40))) + (200 * (2 ** 30))) + (100 * (2 ** 20))) + (50 * (2 ** 10))) + 25): u'800.39    PB', (2 ** 60): (2 ** 60)}
    unicode_test_cases = {u'': u'0.00    B', u'1024': u'1.00    KB', u'1024.5': u'1.00    KB'}
    for tests in (test_cases, unicode_test_cases):
        for (size, result) in six.iteritems(tests):
            self.assertEqual(pretty_file_size(size), result)
