def test_ordinal_format(): labels = ordinal_format()(range(110, 115)) assert labels == ['110th', '111th', '112th', '113th', '114th'] labels = ordinal_format()(range(120, 125)) assert labels == ['120th', '121st', '122nd', '123rd', '124th'] labels = ordinal_format(big_mark=',')(range(1200, 1205)) assert labels == ['1,200th', '1,201st', '1,202nd', '1,203rd', '1,204th'] labels = ordinal_format(big_mark='.')(range(1200, 1205)) assert labels == ['1.200th', '1.201st', '1.202nd', '1.203rd', '1.204th']
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) == [] assert pvalue_format()(x) == [] assert ordinal_format()(x) == [] assert number_bytes_format()(x) == []