def test_empty_breaks(): x = [] assert custom_format()(x) == [] assert comma_format()(x) == [] assert currency_format()(x) == [] assert percent_format()(x) == [] assert scientific_format()(x) == [] assert date_format()(x) == [] assert mpl_format()(x) == [] assert log_format()(x) == [] assert timedelta_format()(x) == []
def test_mpl_format(): formatter = mpl_format() assert formatter([5, 10, 100, 150]) == ['5', '10', '100', '150'] # trigger the order of magnitude correction (not any more) assert formatter([5, 10, 100, 150e8]) == ['5', '10', '100', '15000000000']
def test_mpl_format(): formatter = mpl_format() assert formatter([5, 10, 100, 150]) == ['5', '10', '100', '150'] # trigger the order of magnitude correction assert formatter([5, 10, 100, 150e8]) == ['0', '0', '0', '1.5e10']