def test_human_readable():
 f = formatters.human_readable
 assert (f(1) == '1')
 assert (f(1.0) == '1')
 assert (f(10) == '10')
 assert (f(12.5) == '12.5')
 assert (f(1000) == '1k')
 assert (f(5000) == '5k')
 assert (f(100000) == '100k')
 assert (f(1253) == '1.253k')
 assert (f(1250) == '1.25k')
 assert (f(0.1) == '100m')
 assert (f(0.01) == '10m')
 assert (f(0.001) == '1m')
 assert (f(0.002) == '2m')
 assert (f(0.0025) == '2.5m')
 assert (f(0.0001) == u('100\xc2\xb5'))
 assert (f(0.000123) == u('123\xc2\xb5'))
 assert (f(1e-05) == u('10\xc2\xb5'))
 assert (f(1e-06) == u('1\xc2\xb5'))
 assert (f(1e-07) == u('100n'))
 assert (f(1e-10) == u('100p'))
 assert (f(0) == '0')
 assert (f(0.0) == '0')
 assert (f((-1337)) == '-1.337k')
 assert (f((-4.2e-08)) == '-42n')

def test_human_readable ( ) : f = formatters . human_readable assert ( f ( 1 ) == '1' ) assert ( f ( 1.0 ) == '1' ) assert ( f ( 10 ) == '10' ) assert ( f ( 12.5 ) == '12.5' ) assert ( f ( 1000 ) == '1k' ) assert ( f ( 5000 ) == '5k' ) assert ( f ( 100000 ) == '100k' ) assert ( f ( 1253 ) == '1.253k' ) assert ( f ( 1250 ) == '1.25k' ) assert ( f ( 0.1 ) == '100m' ) assert ( f ( 0.01 ) == '10m' ) assert ( f ( 0.001 ) == '1m' ) assert ( f ( 0.002 ) == '2m' ) assert ( f ( 0.0025 ) == '2.5m' ) assert ( f ( 0.0001 ) == u ( '100\xc2\xb5' ) ) assert ( f ( 0.000123 ) == u ( '123\xc2\xb5' ) ) assert ( f ( 1e-05 ) == u ( '10\xc2\xb5' ) ) assert ( f ( 1e-06 ) == u ( '1\xc2\xb5' ) ) assert ( f ( 1e-07 ) == u ( '100n' ) ) assert ( f ( 1e-10 ) == u ( '100p' ) ) assert ( f ( 0 ) == '0' ) assert ( f ( 0.0 ) == '0' ) assert ( f ( ( - 1337 ) ) == '-1.337k' ) assert ( f ( ( - 4.2e-08 ) ) == '-42n' )
test human readable option .