    def test_readable_mem(self):
        """
        Check readable_mem works as expected.
        """
        # Check formatting works as expected.
        self.assertEqual("9999", readable_mem(9999))
        self.assertEqual("10K", readable_mem(10240))
        self.assertEqual("1024K", readable_mem(1024*1024))
        self.assertEqual("10M", readable_mem(1024*1024*10))
        self.assertEqual("10G", readable_mem(1024*1024*1024*10))
        self.assertEqual("10T", readable_mem(1024*1024*1024*1024*10))
        self.assertEqual("10P", readable_mem(1024*1024*1024*1024*1024*10))
Check readable_mem works as expected.
tests/test_utilities.py