def test_significant():
 f = formatters.significant
 assert (f(1) == '1')
 assert (f(1.0) == '1')
 assert (f((-1.0)) == '-1')
 assert (f(10) == '10')
 assert (f(10000000000) == '1e+10')
 assert (f(100000000000) == '1e+11')
 assert (f(120000000000) == '1.2e+11')
 assert (f(0.1) == '0.1')
 assert (f(0.01) == '0.01')
 assert (f(1e-10) == '1e-10')
 assert (f((-1e-10)) == '-1e-10')
 assert (f(1.002e-10) == '1.002e-10')
 assert (f(1.002e-10) == '1.002e-10')
 assert (f(0.12345678912345) == '0.1234567891')
 assert (f(0.012345678912345) == '0.01234567891')
 assert (f(12345678912345) == '1.234567891e+13')

def test_significant ( ) : f = formatters . significant assert ( f ( 1 ) == '1' ) assert ( f ( 1.0 ) == '1' ) assert ( f ( ( - 1.0 ) ) == '-1' ) assert ( f ( 10 ) == '10' ) assert ( f ( 10000000000 ) == '1e+10' ) assert ( f ( 100000000000 ) == '1e+11' ) assert ( f ( 120000000000 ) == '1.2e+11' ) assert ( f ( 0.1 ) == '0.1' ) assert ( f ( 0.01 ) == '0.01' ) assert ( f ( 1e-10 ) == '1e-10' ) assert ( f ( ( - 1e-10 ) ) == '-1e-10' ) assert ( f ( 1.002e-10 ) == '1.002e-10' ) assert ( f ( 1.002e-10 ) == '1.002e-10' ) assert ( f ( 0.12345678912345 ) == '0.1234567891' ) assert ( f ( 0.012345678912345 ) == '0.01234567891' ) assert ( f ( 12345678912345 ) == '1.234567891e+13' )
test significant formatter .