File: test_locales.py

package info (click to toggle)
python-arrow 1.3.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 932 kB
  • sloc: python: 14,371; makefile: 67
file content (3180 lines) | stat: -rw-r--r-- 167,891 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
import pytest

from arrow import arrow, locales


@pytest.mark.usefixtures("lang_locales")
class TestLocaleValidation:
    """Validate locales to ensure that translations are valid and complete"""

    def test_locale_validation(self):
        for locale_cls in self.locales.values():
            # 7 days + 1 spacer to allow for 1-indexing of months
            assert len(locale_cls.day_names) == 8
            assert locale_cls.day_names[0] == ""
            # ensure that all string from index 1 onward are valid (not blank or None)
            assert all(locale_cls.day_names[1:])

            assert len(locale_cls.day_abbreviations) == 8
            assert locale_cls.day_abbreviations[0] == ""
            assert all(locale_cls.day_abbreviations[1:])

            # 12 months + 1 spacer to allow for 1-indexing of months
            assert len(locale_cls.month_names) == 13
            assert locale_cls.month_names[0] == ""
            assert all(locale_cls.month_names[1:])

            assert len(locale_cls.month_abbreviations) == 13
            assert locale_cls.month_abbreviations[0] == ""
            assert all(locale_cls.month_abbreviations[1:])

            assert len(locale_cls.names) > 0
            assert locale_cls.past is not None
            assert locale_cls.future is not None

    def test_locale_name_validation(self):
        for locale_cls in self.locales.values():
            for locale_name in locale_cls.names:
                assert len(locale_name) == 2 or len(locale_name) == 5
                assert locale_name.islower()
                # Not a two-letter code
                if len(locale_name) > 2:
                    assert "-" in locale_name
                    assert locale_name.count("-") == 1

    def test_duplicated_locale_name(self):
        with pytest.raises(LookupError):

            class Locale1(locales.Locale):
                names = ["en-us"]


class TestModule:
    def test_get_locale(self, mocker):
        mock_locale = mocker.Mock()
        mock_locale_cls = mocker.Mock()
        mock_locale_cls.return_value = mock_locale

        with pytest.raises(ValueError):
            arrow.locales.get_locale("locale-name")

        cls_dict = arrow.locales._locale_map
        mocker.patch.dict(cls_dict, {"locale-name": mock_locale_cls})

        result = arrow.locales.get_locale("locale_name")
        assert result == mock_locale

        # Capitalization and hyphenation should still yield the same locale
        result = arrow.locales.get_locale("locale-name")
        assert result == mock_locale

        result = arrow.locales.get_locale("locale-NAME")
        assert result == mock_locale

    def test_get_locale_by_class_name(self, mocker):
        mock_locale_cls = mocker.Mock()
        mock_locale_obj = mock_locale_cls.return_value = mocker.Mock()

        globals_fn = mocker.Mock()
        globals_fn.return_value = {"NonExistentLocale": mock_locale_cls}

        with pytest.raises(ValueError):
            arrow.locales.get_locale_by_class_name("NonExistentLocale")

        mocker.patch.object(locales, "globals", globals_fn)
        result = arrow.locales.get_locale_by_class_name("NonExistentLocale")

        mock_locale_cls.assert_called_once_with()
        assert result == mock_locale_obj

    def test_locales(self):
        assert len(locales._locale_map) > 0


class TestCustomLocale:
    def test_custom_locale_subclass(self):
        class CustomLocale1(locales.Locale):
            names = ["foo", "foo-BAR"]

        assert locales.get_locale("foo") is not None
        assert locales.get_locale("foo-BAR") is not None
        assert locales.get_locale("foo_bar") is not None

        class CustomLocale2(locales.Locale):
            names = ["underscores_ok"]

        assert locales.get_locale("underscores_ok") is not None


@pytest.mark.usefixtures("lang_locale")
class TestEnglishLocale:
    def test_describe(self):
        assert self.locale.describe("now", only_distance=True) == "instantly"
        assert self.locale.describe("now", only_distance=False) == "just now"

    def test_format_timeframe(self):
        assert self.locale._format_timeframe("hours", 2) == "2 hours"
        assert self.locale._format_timeframe("hour", 0) == "an hour"

    def test_format_relative_now(self):
        result = self.locale._format_relative("just now", "now", 0)

        assert result == "just now"

    def test_format_relative_past(self):
        result = self.locale._format_relative("an hour", "hour", 1)

        assert result == "in an hour"

    def test_format_relative_future(self):
        result = self.locale._format_relative("an hour", "hour", -1)

        assert result == "an hour ago"

    def test_ordinal_number(self):
        assert self.locale.ordinal_number(0) == "0th"
        assert self.locale.ordinal_number(1) == "1st"
        assert self.locale.ordinal_number(2) == "2nd"
        assert self.locale.ordinal_number(3) == "3rd"
        assert self.locale.ordinal_number(4) == "4th"
        assert self.locale.ordinal_number(10) == "10th"
        assert self.locale.ordinal_number(11) == "11th"
        assert self.locale.ordinal_number(12) == "12th"
        assert self.locale.ordinal_number(13) == "13th"
        assert self.locale.ordinal_number(14) == "14th"
        assert self.locale.ordinal_number(21) == "21st"
        assert self.locale.ordinal_number(22) == "22nd"
        assert self.locale.ordinal_number(23) == "23rd"
        assert self.locale.ordinal_number(24) == "24th"

        assert self.locale.ordinal_number(100) == "100th"
        assert self.locale.ordinal_number(101) == "101st"
        assert self.locale.ordinal_number(102) == "102nd"
        assert self.locale.ordinal_number(103) == "103rd"
        assert self.locale.ordinal_number(104) == "104th"
        assert self.locale.ordinal_number(110) == "110th"
        assert self.locale.ordinal_number(111) == "111th"
        assert self.locale.ordinal_number(112) == "112th"
        assert self.locale.ordinal_number(113) == "113th"
        assert self.locale.ordinal_number(114) == "114th"
        assert self.locale.ordinal_number(121) == "121st"
        assert self.locale.ordinal_number(122) == "122nd"
        assert self.locale.ordinal_number(123) == "123rd"
        assert self.locale.ordinal_number(124) == "124th"

    def test_meridian_invalid_token(self):
        assert self.locale.meridian(7, None) is None
        assert self.locale.meridian(7, "B") is None
        assert self.locale.meridian(7, "NONSENSE") is None


@pytest.mark.usefixtures("lang_locale")
class TestItalianLocale:
    def test_ordinal_number(self):
        assert self.locale.ordinal_number(1) == "1º"


@pytest.mark.usefixtures("lang_locale")
class TestSpanishLocale:
    def test_ordinal_number(self):
        assert self.locale.ordinal_number(1) == "1º"

    def test_format_timeframe(self):
        assert self.locale._format_timeframe("now", 0) == "ahora"
        assert self.locale._format_timeframe("seconds", 1) == "1 segundos"
        assert self.locale._format_timeframe("seconds", 3) == "3 segundos"
        assert self.locale._format_timeframe("seconds", 30) == "30 segundos"
        assert self.locale._format_timeframe("minute", 1) == "un minuto"
        assert self.locale._format_timeframe("minutes", 4) == "4 minutos"
        assert self.locale._format_timeframe("minutes", 40) == "40 minutos"
        assert self.locale._format_timeframe("hour", 1) == "una hora"
        assert self.locale._format_timeframe("hours", 5) == "5 horas"
        assert self.locale._format_timeframe("hours", 23) == "23 horas"
        assert self.locale._format_timeframe("day", 1) == "un día"
        assert self.locale._format_timeframe("days", 6) == "6 días"
        assert self.locale._format_timeframe("days", 12) == "12 días"
        assert self.locale._format_timeframe("week", 1) == "una semana"
        assert self.locale._format_timeframe("weeks", 2) == "2 semanas"
        assert self.locale._format_timeframe("weeks", 3) == "3 semanas"
        assert self.locale._format_timeframe("month", 1) == "un mes"
        assert self.locale._format_timeframe("months", 7) == "7 meses"
        assert self.locale._format_timeframe("months", 11) == "11 meses"
        assert self.locale._format_timeframe("year", 1) == "un año"
        assert self.locale._format_timeframe("years", 8) == "8 años"
        assert self.locale._format_timeframe("years", 12) == "12 años"

        assert self.locale._format_timeframe("now", 0) == "ahora"
        assert self.locale._format_timeframe("seconds", -1) == "1 segundos"
        assert self.locale._format_timeframe("seconds", -9) == "9 segundos"
        assert self.locale._format_timeframe("seconds", -12) == "12 segundos"
        assert self.locale._format_timeframe("minute", -1) == "un minuto"
        assert self.locale._format_timeframe("minutes", -2) == "2 minutos"
        assert self.locale._format_timeframe("minutes", -10) == "10 minutos"
        assert self.locale._format_timeframe("hour", -1) == "una hora"
        assert self.locale._format_timeframe("hours", -3) == "3 horas"
        assert self.locale._format_timeframe("hours", -11) == "11 horas"
        assert self.locale._format_timeframe("day", -1) == "un día"
        assert self.locale._format_timeframe("days", -2) == "2 días"
        assert self.locale._format_timeframe("days", -12) == "12 días"
        assert self.locale._format_timeframe("week", -1) == "una semana"
        assert self.locale._format_timeframe("weeks", -2) == "2 semanas"
        assert self.locale._format_timeframe("weeks", -3) == "3 semanas"
        assert self.locale._format_timeframe("month", -1) == "un mes"
        assert self.locale._format_timeframe("months", -3) == "3 meses"
        assert self.locale._format_timeframe("months", -13) == "13 meses"
        assert self.locale._format_timeframe("year", -1) == "un año"
        assert self.locale._format_timeframe("years", -4) == "4 años"
        assert self.locale._format_timeframe("years", -14) == "14 años"


@pytest.mark.usefixtures("lang_locale")
class TestFrenchLocale:
    def test_ordinal_number(self):
        assert self.locale.ordinal_number(1) == "1er"
        assert self.locale.ordinal_number(2) == "2e"

    def test_month_abbreviation(self):
        assert "juil" in self.locale.month_abbreviations


@pytest.mark.usefixtures("lang_locale")
class TestFrenchCanadianLocale:
    def test_month_abbreviation(self):
        assert "juill" in self.locale.month_abbreviations


@pytest.mark.usefixtures("lang_locale")
class TestRussianLocale:
    def test_singles_timeframe(self):
        # Second
        result = self.locale._format_timeframe("second", 1)
        assert result == "секунда"

        result = self.locale._format_timeframe("second", -1)
        assert result == "секунда"

        # Quarter
        result = self.locale._format_timeframe("quarter", 1)
        assert result == "квартал"

        result = self.locale._format_timeframe("quarter", -1)
        assert result == "квартал"

    def test_singles_relative(self):
        # Second in the future
        result = self.locale._format_relative("секунду", "second", 1)
        assert result == "через секунду"

        # Second in the past
        result = self.locale._format_relative("секунду", "second", -1)
        assert result == "секунду назад"

        # Quarter in the future
        result = self.locale._format_relative("квартал", "quarter", 1)
        assert result == "через квартал"

        # Quarter in the past
        result = self.locale._format_relative("квартал", "quarter", -1)
        assert result == "квартал назад"

    def test_plurals_timeframe(self):
        # Seconds in the future
        result = self.locale._format_timeframe("seconds", 2)
        assert result == "2 секунды"

        result = self.locale._format_timeframe("seconds", 5)
        assert result == "5 секунд"

        result = self.locale._format_timeframe("seconds", 21)
        assert result == "21 секунду"

        result = self.locale._format_timeframe("seconds", 22)
        assert result == "22 секунды"

        result = self.locale._format_timeframe("seconds", 25)
        assert result == "25 секунд"

        # Seconds in the past
        result = self.locale._format_timeframe("seconds", -2)
        assert result == "2 секунды"

        result = self.locale._format_timeframe("seconds", -5)
        assert result == "5 секунд"

        result = self.locale._format_timeframe("seconds", -21)
        assert result == "21 секунду"

        result = self.locale._format_timeframe("seconds", -22)
        assert result == "22 секунды"

        result = self.locale._format_timeframe("seconds", -25)
        assert result == "25 секунд"

        # Quarters in the future
        result = self.locale._format_timeframe("quarters", 2)
        assert result == "2 квартала"

        result = self.locale._format_timeframe("quarters", 5)
        assert result == "5 кварталов"

        result = self.locale._format_timeframe("quarters", 21)
        assert result == "21 квартал"

        result = self.locale._format_timeframe("quarters", 22)
        assert result == "22 квартала"

        result = self.locale._format_timeframe("quarters", 25)
        assert result == "25 кварталов"

        # Quarters in the past
        result = self.locale._format_timeframe("quarters", -2)
        assert result == "2 квартала"

        result = self.locale._format_timeframe("quarters", -5)
        assert result == "5 кварталов"

        result = self.locale._format_timeframe("quarters", -21)
        assert result == "21 квартал"

        result = self.locale._format_timeframe("quarters", -22)
        assert result == "22 квартала"

        result = self.locale._format_timeframe("quarters", -25)
        assert result == "25 кварталов"

    def test_plurals_relative(self):
        # Seconds in the future
        result = self.locale._format_relative("1 секунду", "seconds", 1)
        assert result == "через 1 секунду"

        result = self.locale._format_relative("2 секунды", "seconds", 2)
        assert result == "через 2 секунды"

        result = self.locale._format_relative("5 секунд", "seconds", 5)
        assert result == "через 5 секунд"

        result = self.locale._format_relative("21 секунду", "seconds", 21)
        assert result == "через 21 секунду"

        result = self.locale._format_relative("25 секунд", "seconds", 25)
        assert result == "через 25 секунд"

        # Seconds in the past
        result = self.locale._format_relative("1 секунду", "seconds", -1)
        assert result == "1 секунду назад"

        result = self.locale._format_relative("2 секунды", "seconds", -2)
        assert result == "2 секунды назад"

        result = self.locale._format_relative("5 секунд", "seconds", -5)
        assert result == "5 секунд назад"

        result = self.locale._format_relative("21 секунда", "seconds", -21)
        assert result == "21 секунда назад"

        result = self.locale._format_relative("25 секунд", "seconds", -25)
        assert result == "25 секунд назад"

        # Quarters in the future
        result = self.locale._format_relative("1 квартал", "quarters", 1)
        assert result == "через 1 квартал"

        result = self.locale._format_relative("2 квартала", "quarters", 2)
        assert result == "через 2 квартала"

        result = self.locale._format_relative("5 кварталов", "quarters", 5)
        assert result == "через 5 кварталов"

        result = self.locale._format_relative("21 квартал", "quarters", 21)
        assert result == "через 21 квартал"

        result = self.locale._format_relative("25 кварталов", "quarters", 25)
        assert result == "через 25 кварталов"

        # Quarters in the past
        result = self.locale._format_relative("1 квартал", "quarters", -1)
        assert result == "1 квартал назад"

        result = self.locale._format_relative("2 квартала", "quarters", -2)
        assert result == "2 квартала назад"

        result = self.locale._format_relative("5 кварталов", "quarters", -5)
        assert result == "5 кварталов назад"

        result = self.locale._format_relative("21 квартал", "quarters", -21)
        assert result == "21 квартал назад"

        result = self.locale._format_relative("25 кварталов", "quarters", -25)
        assert result == "25 кварталов назад"

    def test_plurals2(self):
        assert self.locale._format_timeframe("hours", 0) == "0 часов"
        assert self.locale._format_timeframe("hours", 1) == "1 час"
        assert self.locale._format_timeframe("hours", 2) == "2 часа"
        assert self.locale._format_timeframe("hours", 4) == "4 часа"
        assert self.locale._format_timeframe("hours", 5) == "5 часов"
        assert self.locale._format_timeframe("hours", 21) == "21 час"
        assert self.locale._format_timeframe("hours", 22) == "22 часа"
        assert self.locale._format_timeframe("hours", 25) == "25 часов"

        # feminine grammatical gender should be tested separately
        assert self.locale._format_timeframe("minutes", 0) == "0 минут"
        assert self.locale._format_timeframe("minutes", 1) == "1 минуту"
        assert self.locale._format_timeframe("minutes", 2) == "2 минуты"
        assert self.locale._format_timeframe("minutes", 4) == "4 минуты"
        assert self.locale._format_timeframe("minutes", 5) == "5 минут"
        assert self.locale._format_timeframe("minutes", 21) == "21 минуту"
        assert self.locale._format_timeframe("minutes", 22) == "22 минуты"
        assert self.locale._format_timeframe("minutes", 25) == "25 минут"


@pytest.mark.usefixtures("lang_locale")
class TestPolishLocale:
    def test_plurals(self):
        assert self.locale._format_timeframe("seconds", 0) == "0 sekund"
        assert self.locale._format_timeframe("second", 1) == "sekundę"
        assert self.locale._format_timeframe("seconds", 2) == "2 sekundy"
        assert self.locale._format_timeframe("seconds", 5) == "5 sekund"
        assert self.locale._format_timeframe("seconds", 21) == "21 sekund"
        assert self.locale._format_timeframe("seconds", 22) == "22 sekundy"
        assert self.locale._format_timeframe("seconds", 25) == "25 sekund"

        assert self.locale._format_timeframe("minutes", 0) == "0 minut"
        assert self.locale._format_timeframe("minute", 1) == "minutę"
        assert self.locale._format_timeframe("minutes", 2) == "2 minuty"
        assert self.locale._format_timeframe("minutes", 5) == "5 minut"
        assert self.locale._format_timeframe("minutes", 21) == "21 minut"
        assert self.locale._format_timeframe("minutes", 22) == "22 minuty"
        assert self.locale._format_timeframe("minutes", 25) == "25 minut"

        assert self.locale._format_timeframe("hours", 0) == "0 godzin"
        assert self.locale._format_timeframe("hour", 1) == "godzinę"
        assert self.locale._format_timeframe("hours", 2) == "2 godziny"
        assert self.locale._format_timeframe("hours", 5) == "5 godzin"
        assert self.locale._format_timeframe("hours", 21) == "21 godzin"
        assert self.locale._format_timeframe("hours", 22) == "22 godziny"
        assert self.locale._format_timeframe("hours", 25) == "25 godzin"

        assert self.locale._format_timeframe("weeks", 0) == "0 tygodni"
        assert self.locale._format_timeframe("week", 1) == "tydzień"
        assert self.locale._format_timeframe("weeks", 2) == "2 tygodnie"
        assert self.locale._format_timeframe("weeks", 5) == "5 tygodni"
        assert self.locale._format_timeframe("weeks", 21) == "21 tygodni"
        assert self.locale._format_timeframe("weeks", 22) == "22 tygodnie"
        assert self.locale._format_timeframe("weeks", 25) == "25 tygodni"

        assert self.locale._format_timeframe("months", 0) == "0 miesięcy"
        assert self.locale._format_timeframe("month", 1) == "miesiąc"
        assert self.locale._format_timeframe("months", 2) == "2 miesiące"
        assert self.locale._format_timeframe("months", 5) == "5 miesięcy"
        assert self.locale._format_timeframe("months", 21) == "21 miesięcy"
        assert self.locale._format_timeframe("months", 22) == "22 miesiące"
        assert self.locale._format_timeframe("months", 25) == "25 miesięcy"

        assert self.locale._format_timeframe("years", 0) == "0 lat"
        assert self.locale._format_timeframe("year", 1) == "rok"
        assert self.locale._format_timeframe("years", 2) == "2 lata"
        assert self.locale._format_timeframe("years", 5) == "5 lat"
        assert self.locale._format_timeframe("years", 21) == "21 lat"
        assert self.locale._format_timeframe("years", 22) == "22 lata"
        assert self.locale._format_timeframe("years", 25) == "25 lat"


@pytest.mark.usefixtures("lang_locale")
class TestIcelandicLocale:
    def test_format_timeframe(self):
        assert self.locale._format_timeframe("now", 0) == "rétt í þessu"

        assert self.locale._format_timeframe("second", -1) == "sekúndu"
        assert self.locale._format_timeframe("second", 1) == "sekúndu"

        assert self.locale._format_timeframe("minute", -1) == "einni mínútu"
        assert self.locale._format_timeframe("minute", 1) == "eina mínútu"

        assert self.locale._format_timeframe("minutes", -2) == "2 mínútum"
        assert self.locale._format_timeframe("minutes", 2) == "2 mínútur"

        assert self.locale._format_timeframe("hour", -1) == "einum tíma"
        assert self.locale._format_timeframe("hour", 1) == "einn tíma"

        assert self.locale._format_timeframe("hours", -2) == "2 tímum"
        assert self.locale._format_timeframe("hours", 2) == "2 tíma"

        assert self.locale._format_timeframe("day", -1) == "einum degi"
        assert self.locale._format_timeframe("day", 1) == "einn dag"

        assert self.locale._format_timeframe("days", -2) == "2 dögum"
        assert self.locale._format_timeframe("days", 2) == "2 daga"

        assert self.locale._format_timeframe("month", -1) == "einum mánuði"
        assert self.locale._format_timeframe("month", 1) == "einn mánuð"

        assert self.locale._format_timeframe("months", -2) == "2 mánuðum"
        assert self.locale._format_timeframe("months", 2) == "2 mánuði"

        assert self.locale._format_timeframe("year", -1) == "einu ári"
        assert self.locale._format_timeframe("year", 1) == "eitt ár"

        assert self.locale._format_timeframe("years", -2) == "2 árum"
        assert self.locale._format_timeframe("years", 2) == "2 ár"

        with pytest.raises(ValueError):
            self.locale._format_timeframe("years", 0)


@pytest.mark.usefixtures("lang_locale")
class TestMalayalamLocale:
    def test_format_timeframe(self):
        assert self.locale._format_timeframe("hours", 2) == "2 മണിക്കൂർ"
        assert self.locale._format_timeframe("hour", 0) == "ഒരു മണിക്കൂർ"

    def test_format_relative_now(self):
        result = self.locale._format_relative("ഇപ്പോൾ", "now", 0)

        assert result == "ഇപ്പോൾ"

    def test_format_relative_past(self):
        result = self.locale._format_relative("ഒരു മണിക്കൂർ", "hour", 1)
        assert result == "ഒരു മണിക്കൂർ ശേഷം"

    def test_format_relative_future(self):
        result = self.locale._format_relative("ഒരു മണിക്കൂർ", "hour", -1)
        assert result == "ഒരു മണിക്കൂർ മുമ്പ്"


@pytest.mark.usefixtures("lang_locale")
class TestMalteseLocale:
    def test_format_timeframe(self):
        assert self.locale._format_timeframe("now", 0) == "issa"
        assert self.locale._format_timeframe("second", 1) == "sekonda"
        assert self.locale._format_timeframe("seconds", 30) == "30 sekondi"
        assert self.locale._format_timeframe("minute", 1) == "minuta"
        assert self.locale._format_timeframe("minutes", 4) == "4 minuti"
        assert self.locale._format_timeframe("hour", 1) == "siegħa"
        assert self.locale._format_timeframe("hours", 2) == "2 sagħtejn"
        assert self.locale._format_timeframe("hours", 4) == "4 sigħat"
        assert self.locale._format_timeframe("day", 1) == "jum"
        assert self.locale._format_timeframe("days", 2) == "2 jumejn"
        assert self.locale._format_timeframe("days", 5) == "5 ijiem"
        assert self.locale._format_timeframe("month", 1) == "xahar"
        assert self.locale._format_timeframe("months", 2) == "2 xahrejn"
        assert self.locale._format_timeframe("months", 7) == "7 xhur"
        assert self.locale._format_timeframe("year", 1) == "sena"
        assert self.locale._format_timeframe("years", 2) == "2 sentejn"
        assert self.locale._format_timeframe("years", 8) == "8 snin"

    def test_weekday(self):
        dt = arrow.Arrow(2015, 4, 11, 17, 30, 00)
        assert self.locale.day_name(dt.isoweekday()) == "Is-Sibt"
        assert self.locale.day_abbreviation(dt.isoweekday()) == "S"


@pytest.mark.usefixtures("lang_locale")
class TestHindiLocale:
    def test_format_timeframe(self):
        assert self.locale._format_timeframe("hours", 2) == "2 घंटे"
        assert self.locale._format_timeframe("hour", 0) == "एक घंटा"

    def test_format_relative_now(self):
        result = self.locale._format_relative("अभी", "now", 0)
        assert result == "अभी"

    def test_format_relative_past(self):
        result = self.locale._format_relative("एक घंटा", "hour", 1)
        assert result == "एक घंटा बाद"

    def test_format_relative_future(self):
        result = self.locale._format_relative("एक घंटा", "hour", -1)
        assert result == "एक घंटा पहले"


@pytest.mark.usefixtures("lang_locale")
class TestCzechLocale:
    def test_format_timeframe(self):
        # Now
        assert self.locale._format_timeframe("now", 0) == "Teď"

        # Second(s)
        assert self.locale._format_timeframe("second", -1) == "vteřina"
        assert self.locale._format_timeframe("second", 1) == "vteřina"
        assert self.locale._format_timeframe("seconds", 0) == "vteřina"
        assert self.locale._format_timeframe("seconds", -2) == "2 sekundami"
        assert self.locale._format_timeframe("seconds", -5) == "5 sekundami"
        assert self.locale._format_timeframe("seconds", 2) == "2 sekundy"
        assert self.locale._format_timeframe("seconds", 5) == "5 sekund"

        # Minute(s)
        assert self.locale._format_timeframe("minute", -1) == "minutou"
        assert self.locale._format_timeframe("minute", 1) == "minutu"
        assert self.locale._format_timeframe("minutes", 0) == "0 minut"
        assert self.locale._format_timeframe("minutes", -2) == "2 minutami"
        assert self.locale._format_timeframe("minutes", -5) == "5 minutami"
        assert self.locale._format_timeframe("minutes", 2) == "2 minuty"
        assert self.locale._format_timeframe("minutes", 5) == "5 minut"

        # Hour(s)
        assert self.locale._format_timeframe("hour", -1) == "hodinou"
        assert self.locale._format_timeframe("hour", 1) == "hodinu"
        assert self.locale._format_timeframe("hours", 0) == "0 hodin"
        assert self.locale._format_timeframe("hours", -2) == "2 hodinami"
        assert self.locale._format_timeframe("hours", -5) == "5 hodinami"
        assert self.locale._format_timeframe("hours", 2) == "2 hodiny"
        assert self.locale._format_timeframe("hours", 5) == "5 hodin"

        # Day(s)
        assert self.locale._format_timeframe("day", -1) == "dnem"
        assert self.locale._format_timeframe("day", 1) == "den"
        assert self.locale._format_timeframe("days", 0) == "0 dnů"
        assert self.locale._format_timeframe("days", -2) == "2 dny"
        assert self.locale._format_timeframe("days", -5) == "5 dny"
        assert self.locale._format_timeframe("days", 2) == "2 dny"
        assert self.locale._format_timeframe("days", 5) == "5 dnů"

        # Weeks(s)
        assert self.locale._format_timeframe("week", -1) == "týdnem"
        assert self.locale._format_timeframe("week", 1) == "týden"
        assert self.locale._format_timeframe("weeks", 0) == "0 týdnů"
        assert self.locale._format_timeframe("weeks", -2) == "2 týdny"
        assert self.locale._format_timeframe("weeks", -5) == "5 týdny"
        assert self.locale._format_timeframe("weeks", 2) == "2 týdny"
        assert self.locale._format_timeframe("weeks", 5) == "5 týdnů"

        # Month(s)
        assert self.locale._format_timeframe("month", -1) == "měsícem"
        assert self.locale._format_timeframe("month", 1) == "měsíc"
        assert self.locale._format_timeframe("months", 0) == "0 měsíců"
        assert self.locale._format_timeframe("months", -2) == "2 měsíci"
        assert self.locale._format_timeframe("months", -5) == "5 měsíci"
        assert self.locale._format_timeframe("months", 2) == "2 měsíce"
        assert self.locale._format_timeframe("months", 5) == "5 měsíců"

        # Year(s)
        assert self.locale._format_timeframe("year", -1) == "rokem"
        assert self.locale._format_timeframe("year", 1) == "rok"
        assert self.locale._format_timeframe("years", 0) == "0 let"
        assert self.locale._format_timeframe("years", -2) == "2 lety"
        assert self.locale._format_timeframe("years", -5) == "5 lety"
        assert self.locale._format_timeframe("years", 2) == "2 roky"
        assert self.locale._format_timeframe("years", 5) == "5 let"

    def test_format_relative_now(self):
        result = self.locale._format_relative("Teď", "now", 0)
        assert result == "Teď"

    def test_format_relative_future(self):
        result = self.locale._format_relative("hodinu", "hour", 1)
        assert result == "Za hodinu"

    def test_format_relative_past(self):
        result = self.locale._format_relative("hodinou", "hour", -1)
        assert result == "Před hodinou"


@pytest.mark.usefixtures("lang_locale")
class TestSlovakLocale:
    def test_format_timeframe(self):
        assert self.locale._format_timeframe("seconds", -5) == "5 sekundami"
        assert self.locale._format_timeframe("seconds", -2) == "2 sekundami"
        assert self.locale._format_timeframe("second", -1) == "sekundou"
        assert self.locale._format_timeframe("seconds", 0) == "0 sekúnd"
        assert self.locale._format_timeframe("second", 1) == "sekundu"
        assert self.locale._format_timeframe("seconds", 2) == "2 sekundy"
        assert self.locale._format_timeframe("seconds", 5) == "5 sekúnd"

        assert self.locale._format_timeframe("minutes", -5) == "5 minútami"
        assert self.locale._format_timeframe("minutes", -2) == "2 minútami"
        assert self.locale._format_timeframe("minute", -1) == "minútou"
        assert self.locale._format_timeframe("minutes", 0) == "0 minút"
        assert self.locale._format_timeframe("minute", 1) == "minútu"
        assert self.locale._format_timeframe("minutes", 2) == "2 minúty"
        assert self.locale._format_timeframe("minutes", 5) == "5 minút"

        assert self.locale._format_timeframe("hours", -5) == "5 hodinami"
        assert self.locale._format_timeframe("hours", -2) == "2 hodinami"
        assert self.locale._format_timeframe("hour", -1) == "hodinou"
        assert self.locale._format_timeframe("hours", 0) == "0 hodín"
        assert self.locale._format_timeframe("hour", 1) == "hodinu"
        assert self.locale._format_timeframe("hours", 2) == "2 hodiny"
        assert self.locale._format_timeframe("hours", 5) == "5 hodín"

        assert self.locale._format_timeframe("days", -5) == "5 dňami"
        assert self.locale._format_timeframe("days", -2) == "2 dňami"
        assert self.locale._format_timeframe("day", -1) == "dňom"
        assert self.locale._format_timeframe("days", 0) == "0 dní"
        assert self.locale._format_timeframe("day", 1) == "deň"
        assert self.locale._format_timeframe("days", 2) == "2 dni"
        assert self.locale._format_timeframe("days", 5) == "5 dní"

        assert self.locale._format_timeframe("weeks", -5) == "5 týždňami"
        assert self.locale._format_timeframe("weeks", -2) == "2 týždňami"
        assert self.locale._format_timeframe("week", -1) == "týždňom"
        assert self.locale._format_timeframe("weeks", 0) == "0 týždňov"
        assert self.locale._format_timeframe("week", 1) == "týždeň"
        assert self.locale._format_timeframe("weeks", 2) == "2 týždne"
        assert self.locale._format_timeframe("weeks", 5) == "5 týždňov"

        assert self.locale._format_timeframe("months", -5) == "5 mesiacmi"
        assert self.locale._format_timeframe("months", -2) == "2 mesiacmi"
        assert self.locale._format_timeframe("month", -1) == "mesiacom"
        assert self.locale._format_timeframe("months", 0) == "0 mesiacov"
        assert self.locale._format_timeframe("month", 1) == "mesiac"
        assert self.locale._format_timeframe("months", 2) == "2 mesiace"
        assert self.locale._format_timeframe("months", 5) == "5 mesiacov"

        assert self.locale._format_timeframe("years", -5) == "5 rokmi"
        assert self.locale._format_timeframe("years", -2) == "2 rokmi"
        assert self.locale._format_timeframe("year", -1) == "rokom"
        assert self.locale._format_timeframe("years", 0) == "0 rokov"
        assert self.locale._format_timeframe("year", 1) == "rok"
        assert self.locale._format_timeframe("years", 2) == "2 roky"
        assert self.locale._format_timeframe("years", 5) == "5 rokov"

        assert self.locale._format_timeframe("now", 0) == "Teraz"

    def test_format_relative_now(self):
        result = self.locale._format_relative("Teraz", "now", 0)
        assert result == "Teraz"

    def test_format_relative_future(self):
        result = self.locale._format_relative("hodinu", "hour", 1)
        assert result == "O hodinu"

    def test_format_relative_past(self):
        result = self.locale._format_relative("hodinou", "hour", -1)
        assert result == "Pred hodinou"


@pytest.mark.usefixtures("lang_locale")
class TestBulgarianLocale:
    def test_plurals2(self):
        assert self.locale._format_timeframe("hours", 0) == "0 часа"
        assert self.locale._format_timeframe("hours", 1) == "1 час"
        assert self.locale._format_timeframe("hours", 2) == "2 часа"
        assert self.locale._format_timeframe("hours", 4) == "4 часа"
        assert self.locale._format_timeframe("hours", 5) == "5 часа"
        assert self.locale._format_timeframe("hours", 21) == "21 час"
        assert self.locale._format_timeframe("hours", 22) == "22 часа"
        assert self.locale._format_timeframe("hours", 25) == "25 часа"

        # feminine grammatical gender should be tested separately
        assert self.locale._format_timeframe("minutes", 0) == "0 минути"
        assert self.locale._format_timeframe("minutes", 1) == "1 минута"
        assert self.locale._format_timeframe("minutes", 2) == "2 минути"
        assert self.locale._format_timeframe("minutes", 4) == "4 минути"
        assert self.locale._format_timeframe("minutes", 5) == "5 минути"
        assert self.locale._format_timeframe("minutes", 21) == "21 минута"
        assert self.locale._format_timeframe("minutes", 22) == "22 минути"
        assert self.locale._format_timeframe("minutes", 25) == "25 минути"


@pytest.mark.usefixtures("lang_locale")
class TestMacedonianLocale:
    def test_singles_mk(self):
        assert self.locale._format_timeframe("second", 1) == "една секунда"
        assert self.locale._format_timeframe("minute", 1) == "една минута"
        assert self.locale._format_timeframe("hour", 1) == "еден саат"
        assert self.locale._format_timeframe("day", 1) == "еден ден"
        assert self.locale._format_timeframe("week", 1) == "една недела"
        assert self.locale._format_timeframe("month", 1) == "еден месец"
        assert self.locale._format_timeframe("year", 1) == "една година"

    def test_meridians_mk(self):
        assert self.locale.meridian(7, "A") == "претпладне"
        assert self.locale.meridian(18, "A") == "попладне"
        assert self.locale.meridian(10, "a") == "дп"
        assert self.locale.meridian(22, "a") == "пп"

    def test_describe_mk(self):
        assert self.locale.describe("second", only_distance=True) == "една секунда"
        assert self.locale.describe("second", only_distance=False) == "за една секунда"
        assert self.locale.describe("minute", only_distance=True) == "една минута"
        assert self.locale.describe("minute", only_distance=False) == "за една минута"
        assert self.locale.describe("hour", only_distance=True) == "еден саат"
        assert self.locale.describe("hour", only_distance=False) == "за еден саат"
        assert self.locale.describe("day", only_distance=True) == "еден ден"
        assert self.locale.describe("day", only_distance=False) == "за еден ден"
        assert self.locale.describe("week", only_distance=True) == "една недела"
        assert self.locale.describe("week", only_distance=False) == "за една недела"
        assert self.locale.describe("month", only_distance=True) == "еден месец"
        assert self.locale.describe("month", only_distance=False) == "за еден месец"
        assert self.locale.describe("year", only_distance=True) == "една година"
        assert self.locale.describe("year", only_distance=False) == "за една година"

    def test_relative_mk(self):
        # time
        assert self.locale._format_relative("сега", "now", 0) == "сега"
        assert self.locale._format_relative("1 секунда", "seconds", 1) == "за 1 секунда"
        assert self.locale._format_relative("1 минута", "minutes", 1) == "за 1 минута"
        assert self.locale._format_relative("1 саат", "hours", 1) == "за 1 саат"
        assert self.locale._format_relative("1 ден", "days", 1) == "за 1 ден"
        assert self.locale._format_relative("1 недела", "weeks", 1) == "за 1 недела"
        assert self.locale._format_relative("1 месец", "months", 1) == "за 1 месец"
        assert self.locale._format_relative("1 година", "years", 1) == "за 1 година"
        assert (
            self.locale._format_relative("1 секунда", "seconds", -1) == "пред 1 секунда"
        )
        assert (
            self.locale._format_relative("1 минута", "minutes", -1) == "пред 1 минута"
        )
        assert self.locale._format_relative("1 саат", "hours", -1) == "пред 1 саат"
        assert self.locale._format_relative("1 ден", "days", -1) == "пред 1 ден"
        assert self.locale._format_relative("1 недела", "weeks", -1) == "пред 1 недела"
        assert self.locale._format_relative("1 месец", "months", -1) == "пред 1 месец"
        assert self.locale._format_relative("1 година", "years", -1) == "пред 1 година"

    def test_plurals_mk(self):
        # Seconds
        assert self.locale._format_timeframe("seconds", 0) == "0 секунди"
        assert self.locale._format_timeframe("seconds", 1) == "1 секунда"
        assert self.locale._format_timeframe("seconds", 2) == "2 секунди"
        assert self.locale._format_timeframe("seconds", 4) == "4 секунди"
        assert self.locale._format_timeframe("seconds", 5) == "5 секунди"
        assert self.locale._format_timeframe("seconds", 21) == "21 секунда"
        assert self.locale._format_timeframe("seconds", 22) == "22 секунди"
        assert self.locale._format_timeframe("seconds", 25) == "25 секунди"

        # Minutes
        assert self.locale._format_timeframe("minutes", 0) == "0 минути"
        assert self.locale._format_timeframe("minutes", 1) == "1 минута"
        assert self.locale._format_timeframe("minutes", 2) == "2 минути"
        assert self.locale._format_timeframe("minutes", 4) == "4 минути"
        assert self.locale._format_timeframe("minutes", 5) == "5 минути"
        assert self.locale._format_timeframe("minutes", 21) == "21 минута"
        assert self.locale._format_timeframe("minutes", 22) == "22 минути"
        assert self.locale._format_timeframe("minutes", 25) == "25 минути"

        # Hours
        assert self.locale._format_timeframe("hours", 0) == "0 саати"
        assert self.locale._format_timeframe("hours", 1) == "1 саат"
        assert self.locale._format_timeframe("hours", 2) == "2 саати"
        assert self.locale._format_timeframe("hours", 4) == "4 саати"
        assert self.locale._format_timeframe("hours", 5) == "5 саати"
        assert self.locale._format_timeframe("hours", 21) == "21 саат"
        assert self.locale._format_timeframe("hours", 22) == "22 саати"
        assert self.locale._format_timeframe("hours", 25) == "25 саати"

        # Days
        assert self.locale._format_timeframe("days", 0) == "0 дена"
        assert self.locale._format_timeframe("days", 1) == "1 ден"
        assert self.locale._format_timeframe("days", 2) == "2 дена"
        assert self.locale._format_timeframe("days", 3) == "3 дена"
        assert self.locale._format_timeframe("days", 21) == "21 ден"

        # Weeks
        assert self.locale._format_timeframe("weeks", 0) == "0 недели"
        assert self.locale._format_timeframe("weeks", 1) == "1 недела"
        assert self.locale._format_timeframe("weeks", 2) == "2 недели"
        assert self.locale._format_timeframe("weeks", 4) == "4 недели"
        assert self.locale._format_timeframe("weeks", 5) == "5 недели"
        assert self.locale._format_timeframe("weeks", 21) == "21 недела"
        assert self.locale._format_timeframe("weeks", 22) == "22 недели"
        assert self.locale._format_timeframe("weeks", 25) == "25 недели"

        # Months
        assert self.locale._format_timeframe("months", 0) == "0 месеци"
        assert self.locale._format_timeframe("months", 1) == "1 месец"
        assert self.locale._format_timeframe("months", 2) == "2 месеци"
        assert self.locale._format_timeframe("months", 4) == "4 месеци"
        assert self.locale._format_timeframe("months", 5) == "5 месеци"
        assert self.locale._format_timeframe("months", 21) == "21 месец"
        assert self.locale._format_timeframe("months", 22) == "22 месеци"
        assert self.locale._format_timeframe("months", 25) == "25 месеци"

        # Years
        assert self.locale._format_timeframe("years", 1) == "1 година"
        assert self.locale._format_timeframe("years", 2) == "2 години"
        assert self.locale._format_timeframe("years", 5) == "5 години"

    def test_multi_describe_mk(self):
        describe = self.locale.describe_multi

        fulltest = [("years", 5), ("weeks", 1), ("hours", 1), ("minutes", 6)]
        assert describe(fulltest) == "за 5 години 1 недела 1 саат 6 минути"
        seconds4000_0days = [("days", 0), ("hours", 1), ("minutes", 6)]
        assert describe(seconds4000_0days) == "за 0 дена 1 саат 6 минути"
        seconds4000 = [("hours", 1), ("minutes", 6)]
        assert describe(seconds4000) == "за 1 саат 6 минути"
        assert describe(seconds4000, only_distance=True) == "1 саат 6 минути"
        seconds3700 = [("hours", 1), ("minutes", 1)]
        assert describe(seconds3700) == "за 1 саат 1 минута"
        seconds300_0hours = [("hours", 0), ("minutes", 5)]
        assert describe(seconds300_0hours) == "за 0 саати 5 минути"
        seconds300 = [("minutes", 5)]
        assert describe(seconds300) == "за 5 минути"
        seconds60 = [("minutes", 1)]
        assert describe(seconds60) == "за 1 минута"
        assert describe(seconds60, only_distance=True) == "1 минута"
        seconds60 = [("seconds", 1)]
        assert describe(seconds60) == "за 1 секунда"
        assert describe(seconds60, only_distance=True) == "1 секунда"


@pytest.mark.usefixtures("time_2013_01_01")
@pytest.mark.usefixtures("lang_locale")
class TestHebrewLocale:
    def test_couple_of_timeframe(self):
        # Now
        assert self.locale._format_timeframe("now", 0) == "הרגע"

        # Second(s)
        assert self.locale._format_timeframe("second", 1) == "שנייה"
        assert self.locale._format_timeframe("seconds", 2) == "2 שניות"
        assert self.locale._format_timeframe("seconds", 10) == "10 שניות"
        assert self.locale._format_timeframe("seconds", 11) == "11 שניות"

        # Minute(s)
        assert self.locale._format_timeframe("minute", 1) == "דקה"
        assert self.locale._format_timeframe("minutes", 2) == "2 דקות"
        assert self.locale._format_timeframe("minutes", 10) == "10 דקות"
        assert self.locale._format_timeframe("minutes", 11) == "11 דקות"

        # Day(s)
        assert self.locale._format_timeframe("day", 1) == "יום"
        assert self.locale._format_timeframe("days", 2) == "יומיים"
        assert self.locale._format_timeframe("days", 3) == "3 ימים"
        assert self.locale._format_timeframe("days", 80) == "80 יום"

        # Hour(s)
        assert self.locale._format_timeframe("hour", 1) == "שעה"
        assert self.locale._format_timeframe("hours", 2) == "שעתיים"
        assert self.locale._format_timeframe("hours", 3) == "3 שעות"
        assert self.locale._format_timeframe("hours", 11) == "11 שעות"

        # Week(s)
        assert self.locale._format_timeframe("week", 1) == "שבוע"
        assert self.locale._format_timeframe("weeks", 2) == "שבועיים"
        assert self.locale._format_timeframe("weeks", 3) == "3 שבועות"
        assert self.locale._format_timeframe("weeks", 11) == "11 שבועות"

        # Month(s)
        assert self.locale._format_timeframe("month", 1) == "חודש"
        assert self.locale._format_timeframe("months", 2) == "חודשיים"
        assert self.locale._format_timeframe("months", 4) == "4 חודשים"
        assert self.locale._format_timeframe("months", 11) == "11 חודשים"

        # Year(s)
        assert self.locale._format_timeframe("year", 1) == "שנה"
        assert self.locale._format_timeframe("years", 2) == "שנתיים"
        assert self.locale._format_timeframe("years", 5) == "5 שנים"
        assert self.locale._format_timeframe("years", 15) == "15 שנה"

    def test_describe_multi(self):
        describe = self.locale.describe_multi

        fulltest = [("years", 5), ("week", 1), ("hour", 1), ("minutes", 6)]
        assert describe(fulltest) == "בעוד 5 שנים, שבוע, שעה ו־6 דקות"
        seconds4000_0days = [("days", 0), ("hour", 1), ("minutes", 6)]
        assert describe(seconds4000_0days) == "בעוד 0 ימים, שעה ו־6 דקות"
        seconds4000 = [("hour", 1), ("minutes", 6)]
        assert describe(seconds4000) == "בעוד שעה ו־6 דקות"
        assert describe(seconds4000, only_distance=True) == "שעה ו־6 דקות"
        seconds3700 = [("hour", 1), ("minute", 1)]
        assert describe(seconds3700) == "בעוד שעה ודקה"
        seconds300_0hours = [("hours", 0), ("minutes", 5)]
        assert describe(seconds300_0hours) == "בעוד 0 שעות ו־5 דקות"
        seconds300 = [("minutes", 5)]
        assert describe(seconds300) == "בעוד 5 דקות"
        seconds60 = [("minute", 1)]
        assert describe(seconds60) == "בעוד דקה"
        assert describe(seconds60, only_distance=True) == "דקה"


@pytest.mark.usefixtures("lang_locale")
class TestAzerbaijaniLocale:
    def test_singles_mk(self):
        assert self.locale._format_timeframe("second", 1) == "bir saniyə"
        assert self.locale._format_timeframe("minute", 1) == "bir dəqiqə"
        assert self.locale._format_timeframe("hour", 1) == "bir saat"
        assert self.locale._format_timeframe("day", 1) == "bir gün"
        assert self.locale._format_timeframe("week", 1) == "bir həftə"
        assert self.locale._format_timeframe("month", 1) == "bir ay"
        assert self.locale._format_timeframe("year", 1) == "bir il"

    def test_describe_mk(self):
        assert self.locale.describe("second", only_distance=True) == "bir saniyə"
        assert self.locale.describe("second", only_distance=False) == "bir saniyə sonra"
        assert self.locale.describe("minute", only_distance=True) == "bir dəqiqə"
        assert self.locale.describe("minute", only_distance=False) == "bir dəqiqə sonra"
        assert self.locale.describe("hour", only_distance=True) == "bir saat"
        assert self.locale.describe("hour", only_distance=False) == "bir saat sonra"
        assert self.locale.describe("day", only_distance=True) == "bir gün"
        assert self.locale.describe("day", only_distance=False) == "bir gün sonra"
        assert self.locale.describe("week", only_distance=True) == "bir həftə"
        assert self.locale.describe("week", only_distance=False) == "bir həftə sonra"
        assert self.locale.describe("month", only_distance=True) == "bir ay"
        assert self.locale.describe("month", only_distance=False) == "bir ay sonra"
        assert self.locale.describe("year", only_distance=True) == "bir il"
        assert self.locale.describe("year", only_distance=False) == "bir il sonra"

    def test_relative_mk(self):
        assert self.locale._format_relative("indi", "now", 0) == "indi"
        assert (
            self.locale._format_relative("1 saniyə", "seconds", 1) == "1 saniyə sonra"
        )
        assert (
            self.locale._format_relative("1 saniyə", "seconds", -1) == "1 saniyə əvvəl"
        )
        assert (
            self.locale._format_relative("1 dəqiqə", "minutes", 1) == "1 dəqiqə sonra"
        )
        assert (
            self.locale._format_relative("1 dəqiqə", "minutes", -1) == "1 dəqiqə əvvəl"
        )
        assert self.locale._format_relative("1 saat", "hours", 1) == "1 saat sonra"
        assert self.locale._format_relative("1 saat", "hours", -1) == "1 saat əvvəl"
        assert self.locale._format_relative("1 gün", "days", 1) == "1 gün sonra"
        assert self.locale._format_relative("1 gün", "days", -1) == "1 gün əvvəl"
        assert self.locale._format_relative("1 hafta", "weeks", 1) == "1 hafta sonra"
        assert self.locale._format_relative("1 hafta", "weeks", -1) == "1 hafta əvvəl"
        assert self.locale._format_relative("1 ay", "months", 1) == "1 ay sonra"
        assert self.locale._format_relative("1 ay", "months", -1) == "1 ay əvvəl"
        assert self.locale._format_relative("1 il", "years", 1) == "1 il sonra"
        assert self.locale._format_relative("1 il", "years", -1) == "1 il əvvəl"

    def test_plurals_mk(self):
        assert self.locale._format_timeframe("now", 0) == "indi"
        assert self.locale._format_timeframe("second", 1) == "bir saniyə"
        assert self.locale._format_timeframe("seconds", 30) == "30 saniyə"
        assert self.locale._format_timeframe("minute", 1) == "bir dəqiqə"
        assert self.locale._format_timeframe("minutes", 40) == "40 dəqiqə"
        assert self.locale._format_timeframe("hour", 1) == "bir saat"
        assert self.locale._format_timeframe("hours", 23) == "23 saat"
        assert self.locale._format_timeframe("day", 1) == "bir gün"
        assert self.locale._format_timeframe("days", 12) == "12 gün"
        assert self.locale._format_timeframe("week", 1) == "bir həftə"
        assert self.locale._format_timeframe("weeks", 38) == "38 həftə"
        assert self.locale._format_timeframe("month", 1) == "bir ay"
        assert self.locale._format_timeframe("months", 11) == "11 ay"
        assert self.locale._format_timeframe("year", 1) == "bir il"
        assert self.locale._format_timeframe("years", 12) == "12 il"


@pytest.mark.usefixtures("lang_locale")
class TestMarathiLocale:
    def test_dateCoreFunctionality(self):
        dt = arrow.Arrow(2015, 4, 11, 17, 30, 00)
        assert self.locale.month_name(dt.month) == "एप्रिल"
        assert self.locale.month_abbreviation(dt.month) == "एप्रि"
        assert self.locale.day_name(dt.isoweekday()) == "शनिवार"
        assert self.locale.day_abbreviation(dt.isoweekday()) == "शनि"

    def test_format_timeframe(self):
        assert self.locale._format_timeframe("hours", 2) == "2 तास"
        assert self.locale._format_timeframe("hour", 0) == "एक तास"

    def test_format_relative_now(self):
        result = self.locale._format_relative("सद्य", "now", 0)
        assert result == "सद्य"

    def test_format_relative_past(self):
        result = self.locale._format_relative("एक तास", "hour", 1)
        assert result == "एक तास नंतर"

    def test_format_relative_future(self):
        result = self.locale._format_relative("एक तास", "hour", -1)
        assert result == "एक तास आधी"

    # Not currently implemented
    def test_ordinal_number(self):
        assert self.locale.ordinal_number(1) == "1"


@pytest.mark.usefixtures("lang_locale")
class TestFinnishLocale:
    def test_format_timeframe(self):
        # Now
        assert self.locale._format_timeframe("now", 1) == "juuri nyt"

        # Second(s)
        assert self.locale._format_timeframe("second", -1) == "sekunti"
        assert self.locale._format_timeframe("second", 1) == "sekunnin"
        assert self.locale._format_timeframe("seconds", -2) == "2 sekuntia"
        assert self.locale._format_timeframe("seconds", 2) == "2 sekunnin"

        # Minute(s)
        assert self.locale._format_timeframe("minute", -1) == "minuutti"
        assert self.locale._format_timeframe("minute", 1) == "minuutin"
        assert self.locale._format_timeframe("minutes", -2) == "2 minuuttia"
        assert self.locale._format_timeframe("minutes", 2) == "2 minuutin"

        # Hour(s)
        assert self.locale._format_timeframe("hour", -1) == "tunti"
        assert self.locale._format_timeframe("hour", 1) == "tunnin"
        assert self.locale._format_timeframe("hours", -2) == "2 tuntia"
        assert self.locale._format_timeframe("hours", 2) == "2 tunnin"

        # Day(s)
        assert self.locale._format_timeframe("day", -1) == "päivä"
        assert self.locale._format_timeframe("day", 1) == "päivän"
        assert self.locale._format_timeframe("days", -2) == "2 päivää"
        assert self.locale._format_timeframe("days", 2) == "2 päivän"

        # Month(s)
        assert self.locale._format_timeframe("month", -1) == "kuukausi"
        assert self.locale._format_timeframe("month", 1) == "kuukauden"
        assert self.locale._format_timeframe("months", -2) == "2 kuukautta"
        assert self.locale._format_timeframe("months", 2) == "2 kuukauden"

        # Year(s)
        assert self.locale._format_timeframe("year", -1) == "vuosi"
        assert self.locale._format_timeframe("year", 1) == "vuoden"
        assert self.locale._format_timeframe("years", -2) == "2 vuotta"
        assert self.locale._format_timeframe("years", 2) == "2 vuoden"

    def test_format_relative_now(self):
        result = self.locale._format_relative("juuri nyt", "now", 0)
        assert result == "juuri nyt"

    def test_format_relative_past(self):
        result = self.locale._format_relative("tunnin", "hour", 1)
        assert result == "tunnin kuluttua"

    def test_format_relative_future(self):
        result = self.locale._format_relative("tunti", "hour", -1)
        assert result == "tunti sitten"

    def test_ordinal_number(self):
        assert self.locale.ordinal_number(1) == "1."


@pytest.mark.usefixtures("lang_locale")
class TestGeorgianLocale:
    def test_format_timeframe(self):
        # Now
        assert self.locale._format_timeframe("now", 0) == "ახლა"

        # Second(s)
        assert self.locale._format_timeframe("second", -1) == "წამის"
        assert self.locale._format_timeframe("second", 1) == "წამის"
        assert self.locale._format_timeframe("seconds", -3) == "3 წამის"
        assert self.locale._format_timeframe("seconds", 3) == "3 წამის"

        # Minute(s)
        assert self.locale._format_timeframe("minute", -1) == "წუთის"
        assert self.locale._format_timeframe("minute", 1) == "წუთის"
        assert self.locale._format_timeframe("minutes", -4) == "4 წუთის"
        assert self.locale._format_timeframe("minutes", 4) == "4 წუთის"

        # Hour(s)
        assert self.locale._format_timeframe("hour", -1) == "საათის"
        assert self.locale._format_timeframe("hour", 1) == "საათის"
        assert self.locale._format_timeframe("hours", -23) == "23 საათის"
        assert self.locale._format_timeframe("hours", 23) == "23 საათის"

        # Day(s)
        assert self.locale._format_timeframe("day", -1) == "დღის"
        assert self.locale._format_timeframe("day", 1) == "დღის"
        assert self.locale._format_timeframe("days", -12) == "12 დღის"
        assert self.locale._format_timeframe("days", 12) == "12 დღის"

        # Day(s)
        assert self.locale._format_timeframe("week", -1) == "კვირის"
        assert self.locale._format_timeframe("week", 1) == "კვირის"
        assert self.locale._format_timeframe("weeks", -12) == "12 კვირის"
        assert self.locale._format_timeframe("weeks", 12) == "12 კვირის"

        # Month(s)
        assert self.locale._format_timeframe("month", -1) == "თვის"
        assert self.locale._format_timeframe("month", 1) == "თვის"
        assert self.locale._format_timeframe("months", -2) == "2 თვის"
        assert self.locale._format_timeframe("months", 2) == "2 თვის"

        # Year(s)
        assert self.locale._format_timeframe("year", -1) == "წლის"
        assert self.locale._format_timeframe("year", 1) == "წლის"
        assert self.locale._format_timeframe("years", -2) == "2 წლის"
        assert self.locale._format_timeframe("years", 2) == "2 წლის"

    def test_weekday(self):
        dt = arrow.Arrow(2015, 4, 11, 17, 30, 00)
        assert self.locale.day_name(dt.isoweekday()) == "შაბათი"


@pytest.mark.usefixtures("lang_locale")
class TestGermanLocale:
    def test_ordinal_number(self):
        assert self.locale.ordinal_number(1) == "1."

    def test_define(self):
        assert self.locale.describe("minute", only_distance=True) == "eine Minute"
        assert self.locale.describe("minute", only_distance=False) == "in einer Minute"
        assert self.locale.describe("hour", only_distance=True) == "eine Stunde"
        assert self.locale.describe("hour", only_distance=False) == "in einer Stunde"
        assert self.locale.describe("day", only_distance=True) == "ein Tag"
        assert self.locale.describe("day", only_distance=False) == "in einem Tag"
        assert self.locale.describe("week", only_distance=True) == "eine Woche"
        assert self.locale.describe("week", only_distance=False) == "in einer Woche"
        assert self.locale.describe("month", only_distance=True) == "ein Monat"
        assert self.locale.describe("month", only_distance=False) == "in einem Monat"
        assert self.locale.describe("year", only_distance=True) == "ein Jahr"
        assert self.locale.describe("year", only_distance=False) == "in einem Jahr"

    def test_weekday(self):
        dt = arrow.Arrow(2015, 4, 11, 17, 30, 00)
        assert self.locale.day_name(dt.isoweekday()) == "Samstag"
        assert self.locale.day_abbreviation(dt.isoweekday()) == "Sa"


@pytest.mark.usefixtures("lang_locale")
class TestHungarianLocale:
    def test_format_timeframe(self):
        # Now
        assert self.locale._format_timeframe("now", 0) == "éppen most"

        # Second(s)
        assert self.locale._format_timeframe("second", -1) == "egy második"
        assert self.locale._format_timeframe("second", 1) == "egy második"
        assert self.locale._format_timeframe("seconds", -2) == "2 másodpercekkel"
        assert self.locale._format_timeframe("seconds", 2) == "2 pár másodperc"

        # Minute(s)
        assert self.locale._format_timeframe("minute", -1) == "egy perccel"
        assert self.locale._format_timeframe("minute", 1) == "egy perc"
        assert self.locale._format_timeframe("minutes", -2) == "2 perccel"
        assert self.locale._format_timeframe("minutes", 2) == "2 perc"

        # Hour(s)
        assert self.locale._format_timeframe("hour", -1) == "egy órával"
        assert self.locale._format_timeframe("hour", 1) == "egy óra"
        assert self.locale._format_timeframe("hours", -2) == "2 órával"
        assert self.locale._format_timeframe("hours", 2) == "2 óra"

        # Day(s)
        assert self.locale._format_timeframe("day", -1) == "egy nappal"
        assert self.locale._format_timeframe("day", 1) == "egy nap"
        assert self.locale._format_timeframe("days", -2) == "2 nappal"
        assert self.locale._format_timeframe("days", 2) == "2 nap"

        # Week(s)
        assert self.locale._format_timeframe("week", -1) == "egy héttel"
        assert self.locale._format_timeframe("week", 1) == "egy hét"
        assert self.locale._format_timeframe("weeks", -2) == "2 héttel"
        assert self.locale._format_timeframe("weeks", 2) == "2 hét"

        # Month(s)
        assert self.locale._format_timeframe("month", -1) == "egy hónappal"
        assert self.locale._format_timeframe("month", 1) == "egy hónap"
        assert self.locale._format_timeframe("months", -2) == "2 hónappal"
        assert self.locale._format_timeframe("months", 2) == "2 hónap"

        # Year(s)
        assert self.locale._format_timeframe("year", -1) == "egy évvel"
        assert self.locale._format_timeframe("year", 1) == "egy év"
        assert self.locale._format_timeframe("years", -2) == "2 évvel"
        assert self.locale._format_timeframe("years", 2) == "2 év"


@pytest.mark.usefixtures("lang_locale")
class TestEsperantoLocale:
    def test_format_timeframe(self):
        assert self.locale._format_timeframe("hours", 2) == "2 horoj"
        assert self.locale._format_timeframe("hour", 0) == "un horo"
        assert self.locale._format_timeframe("hours", -2) == "2 horoj"
        assert self.locale._format_timeframe("now", 0) == "nun"

    def test_ordinal_number(self):
        assert self.locale.ordinal_number(1) == "1a"


@pytest.mark.usefixtures("lang_locale")
class TestLaotianLocale:
    def test_year_full(self):
        assert self.locale.year_full(2015) == "2558"

    def test_year_abbreviation(self):
        assert self.locale.year_abbreviation(2015) == "58"

    def test_format_relative_now(self):
        result = self.locale._format_relative("ດຽວນີ້", "now", 0)
        assert result == "ດຽວນີ້"

    def test_format_relative_past(self):
        result = self.locale._format_relative("1 ຊົ່ວໂມງ", "hour", 1)
        assert result == "ໃນ 1 ຊົ່ວໂມງ"
        result = self.locale._format_relative("{0} ຊົ່ວໂມງ", "hours", 2)
        assert result == "ໃນ {0} ຊົ່ວໂມງ"
        result = self.locale._format_relative("ວິນາທີ", "seconds", 42)
        assert result == "ໃນວິນາທີ"

    def test_format_relative_future(self):
        result = self.locale._format_relative("1 ຊົ່ວໂມງ", "hour", -1)
        assert result == "1 ຊົ່ວໂມງ ກ່ອນຫນ້ານີ້"

    def test_format_timeframe(self):
        # minute(s)
        assert self.locale._format_timeframe("minute", 1) == "ນາທີ"
        assert self.locale._format_timeframe("minute", -1) == "ນາທີ"
        assert self.locale._format_timeframe("minutes", 7) == "7 ນາທີ"
        assert self.locale._format_timeframe("minutes", -20) == "20 ນາທີ"
        # day(s)
        assert self.locale._format_timeframe("day", 1) == "ມື້"
        assert self.locale._format_timeframe("day", -1) == "ມື້"
        assert self.locale._format_timeframe("days", 7) == "7 ມື້"
        assert self.locale._format_timeframe("days", -20) == "20 ມື້"
        # week(s)
        assert self.locale._format_timeframe("week", 1) == "ອາທິດ"
        assert self.locale._format_timeframe("week", -1) == "ອາທິດ"
        assert self.locale._format_timeframe("weeks", 7) == "7 ອາທິດ"
        assert self.locale._format_timeframe("weeks", -20) == "20 ອາທິດ"
        # month(s)
        assert self.locale._format_timeframe("month", 1) == "ເດືອນ"
        assert self.locale._format_timeframe("month", -1) == "ເດືອນ"
        assert self.locale._format_timeframe("months", 7) == "7 ເດືອນ"
        assert self.locale._format_timeframe("months", -20) == "20 ເດືອນ"
        # year(s)
        assert self.locale._format_timeframe("year", 1) == "ປີ"
        assert self.locale._format_timeframe("year", -1) == "ປີ"
        assert self.locale._format_timeframe("years", 7) == "7 ປີ"
        assert self.locale._format_timeframe("years", -20) == "20 ປີ"

    def test_weekday(self):
        dt = arrow.Arrow(2015, 4, 11, 17, 30, 00)
        assert self.locale.day_name(dt.isoweekday()) == "ວັນເສົາ"
        assert self.locale.day_abbreviation(dt.isoweekday()) == "ວັນເສົາ"


@pytest.mark.usefixtures("lang_locale")
class TestThaiLocale:
    def test_year_full(self):
        assert self.locale.year_full(2015) == "2558"

    def test_year_abbreviation(self):
        assert self.locale.year_abbreviation(2015) == "58"

    def test_format_relative_now(self):
        result = self.locale._format_relative("ขณะนี้", "now", 0)
        assert result == "ขณะนี้"

    def test_format_relative_past(self):
        result = self.locale._format_relative("1 ชั่วโมง", "hour", 1)
        assert result == "ในอีก 1 ชั่วโมง"
        result = self.locale._format_relative("{0} ชั่วโมง", "hours", 2)
        assert result == "ในอีก {0} ชั่วโมง"
        result = self.locale._format_relative("ไม่กี่วินาที", "seconds", 42)
        assert result == "ในอีกไม่กี่วินาที"

    def test_format_relative_future(self):
        result = self.locale._format_relative("1 ชั่วโมง", "hour", -1)
        assert result == "1 ชั่วโมง ที่ผ่านมา"


@pytest.mark.usefixtures("lang_locale")
class TestBengaliLocale:
    def test_ordinal_number(self):
        assert self.locale._ordinal_number(0) == "0তম"
        assert self.locale._ordinal_number(1) == "1ম"
        assert self.locale._ordinal_number(3) == "3য়"
        assert self.locale._ordinal_number(4) == "4র্থ"
        assert self.locale._ordinal_number(5) == "5ম"
        assert self.locale._ordinal_number(6) == "6ষ্ঠ"
        assert self.locale._ordinal_number(10) == "10ম"
        assert self.locale._ordinal_number(11) == "11তম"
        assert self.locale._ordinal_number(42) == "42তম"
        assert self.locale._ordinal_number(-1) == ""


@pytest.mark.usefixtures("lang_locale")
class TestRomanianLocale:
    def test_timeframes(self):
        assert self.locale._format_timeframe("hours", 2) == "2 ore"
        assert self.locale._format_timeframe("months", 2) == "2 luni"

        assert self.locale._format_timeframe("days", 2) == "2 zile"
        assert self.locale._format_timeframe("years", 2) == "2 ani"

        assert self.locale._format_timeframe("hours", 3) == "3 ore"
        assert self.locale._format_timeframe("months", 4) == "4 luni"
        assert self.locale._format_timeframe("days", 3) == "3 zile"
        assert self.locale._format_timeframe("years", 5) == "5 ani"

    def test_relative_timeframes(self):
        assert self.locale._format_relative("acum", "now", 0) == "acum"
        assert self.locale._format_relative("o oră", "hour", 1) == "peste o oră"
        assert self.locale._format_relative("o oră", "hour", -1) == "o oră în urmă"
        assert self.locale._format_relative("un minut", "minute", 1) == "peste un minut"
        assert (
            self.locale._format_relative("un minut", "minute", -1) == "un minut în urmă"
        )
        assert (
            self.locale._format_relative("câteva secunde", "seconds", -1)
            == "câteva secunde în urmă"
        )
        assert (
            self.locale._format_relative("câteva secunde", "seconds", 1)
            == "peste câteva secunde"
        )
        assert self.locale._format_relative("o zi", "day", -1) == "o zi în urmă"
        assert self.locale._format_relative("o zi", "day", 1) == "peste o zi"


@pytest.mark.usefixtures("lang_locale")
class TestArabicLocale:
    def test_timeframes(self):
        # single
        assert self.locale._format_timeframe("minute", 1) == "دقيقة"
        assert self.locale._format_timeframe("hour", 1) == "ساعة"
        assert self.locale._format_timeframe("day", 1) == "يوم"
        assert self.locale._format_timeframe("week", 1) == "اسبوع"
        assert self.locale._format_timeframe("month", 1) == "شهر"
        assert self.locale._format_timeframe("year", 1) == "سنة"

        # double
        assert self.locale._format_timeframe("minutes", 2) == "دقيقتين"
        assert self.locale._format_timeframe("hours", 2) == "ساعتين"
        assert self.locale._format_timeframe("days", 2) == "يومين"
        assert self.locale._format_timeframe("weeks", 2) == "اسبوعين"
        assert self.locale._format_timeframe("months", 2) == "شهرين"
        assert self.locale._format_timeframe("years", 2) == "سنتين"

        # up to ten
        assert self.locale._format_timeframe("minutes", 3) == "3 دقائق"
        assert self.locale._format_timeframe("hours", 4) == "4 ساعات"
        assert self.locale._format_timeframe("days", 5) == "5 أيام"
        assert self.locale._format_timeframe("weeks", 7) == "7 أسابيع"
        assert self.locale._format_timeframe("months", 6) == "6 أشهر"
        assert self.locale._format_timeframe("years", 10) == "10 سنوات"

        # more than ten
        assert self.locale._format_timeframe("minutes", 11) == "11 دقيقة"
        assert self.locale._format_timeframe("hours", 19) == "19 ساعة"
        assert self.locale._format_timeframe("weeks", 20) == "20 اسبوع"
        assert self.locale._format_timeframe("months", 24) == "24 شهر"
        assert self.locale._format_timeframe("days", 50) == "50 يوم"
        assert self.locale._format_timeframe("years", 115) == "115 سنة"


@pytest.mark.usefixtures("lang_locale")
class TestNepaliLocale:
    def test_format_timeframe(self):
        assert self.locale._format_timeframe("hours", 3) == "3 घण्टा"
        assert self.locale._format_timeframe("hour", 0) == "एक घण्टा"

    def test_format_relative_now(self):
        result = self.locale._format_relative("अहिले", "now", 0)
        assert result == "अहिले"

    def test_format_relative_future(self):
        result = self.locale._format_relative("एक घण्टा", "hour", 1)
        assert result == "एक घण्टा पछी"

    def test_format_relative_past(self):
        result = self.locale._format_relative("एक घण्टा", "hour", -1)
        assert result == "एक घण्टा पहिले"


@pytest.mark.usefixtures("lang_locale")
class TestIndonesianLocale:
    def test_timeframes(self):
        assert self.locale._format_timeframe("hours", 2) == "2 jam"
        assert self.locale._format_timeframe("months", 2) == "2 bulan"

        assert self.locale._format_timeframe("days", 2) == "2 hari"
        assert self.locale._format_timeframe("years", 2) == "2 tahun"

        assert self.locale._format_timeframe("hours", 3) == "3 jam"
        assert self.locale._format_timeframe("months", 4) == "4 bulan"
        assert self.locale._format_timeframe("days", 3) == "3 hari"
        assert self.locale._format_timeframe("years", 5) == "5 tahun"

        assert self.locale._format_timeframe("weeks", 2) == "2 minggu"
        assert self.locale._format_timeframe("quarters", 3) == "3 kuartal"

    def test_format_relative_now(self):
        assert self.locale._format_relative("baru saja", "now", 0) == "baru saja"

    def test_format_relative_past(self):
        assert self.locale._format_relative("1 jam", "hour", 1) == "dalam 1 jam"
        assert self.locale._format_relative("1 detik", "seconds", 1) == "dalam 1 detik"

    def test_format_relative_future(self):
        assert self.locale._format_relative("1 jam", "hour", -1) == "1 jam yang lalu"


@pytest.mark.usefixtures("lang_locale")
class TestTagalogLocale:
    def test_singles_tl(self):
        assert self.locale._format_timeframe("second", 1) == "isang segundo"
        assert self.locale._format_timeframe("minute", 1) == "isang minuto"
        assert self.locale._format_timeframe("hour", 1) == "isang oras"
        assert self.locale._format_timeframe("day", 1) == "isang araw"
        assert self.locale._format_timeframe("week", 1) == "isang linggo"
        assert self.locale._format_timeframe("month", 1) == "isang buwan"
        assert self.locale._format_timeframe("year", 1) == "isang taon"

    def test_meridians_tl(self):
        assert self.locale.meridian(7, "A") == "ng umaga"
        assert self.locale.meridian(18, "A") == "ng hapon"
        assert self.locale.meridian(10, "a") == "nu"
        assert self.locale.meridian(22, "a") == "nh"

    def test_describe_tl(self):
        assert self.locale.describe("second", only_distance=True) == "isang segundo"
        assert (
            self.locale.describe("second", only_distance=False)
            == "isang segundo mula ngayon"
        )
        assert self.locale.describe("minute", only_distance=True) == "isang minuto"
        assert (
            self.locale.describe("minute", only_distance=False)
            == "isang minuto mula ngayon"
        )
        assert self.locale.describe("hour", only_distance=True) == "isang oras"
        assert (
            self.locale.describe("hour", only_distance=False)
            == "isang oras mula ngayon"
        )
        assert self.locale.describe("day", only_distance=True) == "isang araw"
        assert (
            self.locale.describe("day", only_distance=False) == "isang araw mula ngayon"
        )
        assert self.locale.describe("week", only_distance=True) == "isang linggo"
        assert (
            self.locale.describe("week", only_distance=False)
            == "isang linggo mula ngayon"
        )
        assert self.locale.describe("month", only_distance=True) == "isang buwan"
        assert (
            self.locale.describe("month", only_distance=False)
            == "isang buwan mula ngayon"
        )
        assert self.locale.describe("year", only_distance=True) == "isang taon"
        assert (
            self.locale.describe("year", only_distance=False)
            == "isang taon mula ngayon"
        )

    def test_relative_tl(self):
        # time
        assert self.locale._format_relative("ngayon", "now", 0) == "ngayon"
        assert (
            self.locale._format_relative("1 segundo", "seconds", 1)
            == "1 segundo mula ngayon"
        )
        assert (
            self.locale._format_relative("1 minuto", "minutes", 1)
            == "1 minuto mula ngayon"
        )
        assert (
            self.locale._format_relative("1 oras", "hours", 1) == "1 oras mula ngayon"
        )
        assert self.locale._format_relative("1 araw", "days", 1) == "1 araw mula ngayon"
        assert (
            self.locale._format_relative("1 linggo", "weeks", 1)
            == "1 linggo mula ngayon"
        )
        assert (
            self.locale._format_relative("1 buwan", "months", 1)
            == "1 buwan mula ngayon"
        )
        assert (
            self.locale._format_relative("1 taon", "years", 1) == "1 taon mula ngayon"
        )
        assert (
            self.locale._format_relative("1 segundo", "seconds", -1)
            == "nakaraang 1 segundo"
        )
        assert (
            self.locale._format_relative("1 minuto", "minutes", -1)
            == "nakaraang 1 minuto"
        )
        assert self.locale._format_relative("1 oras", "hours", -1) == "nakaraang 1 oras"
        assert self.locale._format_relative("1 araw", "days", -1) == "nakaraang 1 araw"
        assert (
            self.locale._format_relative("1 linggo", "weeks", -1)
            == "nakaraang 1 linggo"
        )
        assert (
            self.locale._format_relative("1 buwan", "months", -1) == "nakaraang 1 buwan"
        )
        assert self.locale._format_relative("1 taon", "years", -1) == "nakaraang 1 taon"

    def test_plurals_tl(self):
        # Seconds
        assert self.locale._format_timeframe("seconds", 0) == "0 segundo"
        assert self.locale._format_timeframe("seconds", 1) == "1 segundo"
        assert self.locale._format_timeframe("seconds", 2) == "2 segundo"
        assert self.locale._format_timeframe("seconds", 4) == "4 segundo"
        assert self.locale._format_timeframe("seconds", 5) == "5 segundo"
        assert self.locale._format_timeframe("seconds", 21) == "21 segundo"
        assert self.locale._format_timeframe("seconds", 22) == "22 segundo"
        assert self.locale._format_timeframe("seconds", 25) == "25 segundo"

        # Minutes
        assert self.locale._format_timeframe("minutes", 0) == "0 minuto"
        assert self.locale._format_timeframe("minutes", 1) == "1 minuto"
        assert self.locale._format_timeframe("minutes", 2) == "2 minuto"
        assert self.locale._format_timeframe("minutes", 4) == "4 minuto"
        assert self.locale._format_timeframe("minutes", 5) == "5 minuto"
        assert self.locale._format_timeframe("minutes", 21) == "21 minuto"
        assert self.locale._format_timeframe("minutes", 22) == "22 minuto"
        assert self.locale._format_timeframe("minutes", 25) == "25 minuto"

        # Hours
        assert self.locale._format_timeframe("hours", 0) == "0 oras"
        assert self.locale._format_timeframe("hours", 1) == "1 oras"
        assert self.locale._format_timeframe("hours", 2) == "2 oras"
        assert self.locale._format_timeframe("hours", 4) == "4 oras"
        assert self.locale._format_timeframe("hours", 5) == "5 oras"
        assert self.locale._format_timeframe("hours", 21) == "21 oras"
        assert self.locale._format_timeframe("hours", 22) == "22 oras"
        assert self.locale._format_timeframe("hours", 25) == "25 oras"

        # Days
        assert self.locale._format_timeframe("days", 0) == "0 araw"
        assert self.locale._format_timeframe("days", 1) == "1 araw"
        assert self.locale._format_timeframe("days", 2) == "2 araw"
        assert self.locale._format_timeframe("days", 3) == "3 araw"
        assert self.locale._format_timeframe("days", 21) == "21 araw"

        # Weeks
        assert self.locale._format_timeframe("weeks", 0) == "0 linggo"
        assert self.locale._format_timeframe("weeks", 1) == "1 linggo"
        assert self.locale._format_timeframe("weeks", 2) == "2 linggo"
        assert self.locale._format_timeframe("weeks", 4) == "4 linggo"
        assert self.locale._format_timeframe("weeks", 5) == "5 linggo"
        assert self.locale._format_timeframe("weeks", 21) == "21 linggo"
        assert self.locale._format_timeframe("weeks", 22) == "22 linggo"
        assert self.locale._format_timeframe("weeks", 25) == "25 linggo"

        # Months
        assert self.locale._format_timeframe("months", 0) == "0 buwan"
        assert self.locale._format_timeframe("months", 1) == "1 buwan"
        assert self.locale._format_timeframe("months", 2) == "2 buwan"
        assert self.locale._format_timeframe("months", 4) == "4 buwan"
        assert self.locale._format_timeframe("months", 5) == "5 buwan"
        assert self.locale._format_timeframe("months", 21) == "21 buwan"
        assert self.locale._format_timeframe("months", 22) == "22 buwan"
        assert self.locale._format_timeframe("months", 25) == "25 buwan"

        # Years
        assert self.locale._format_timeframe("years", 1) == "1 taon"
        assert self.locale._format_timeframe("years", 2) == "2 taon"
        assert self.locale._format_timeframe("years", 5) == "5 taon"

    def test_multi_describe_tl(self):
        describe = self.locale.describe_multi

        fulltest = [("years", 5), ("weeks", 1), ("hours", 1), ("minutes", 6)]
        assert describe(fulltest) == "5 taon 1 linggo 1 oras 6 minuto mula ngayon"
        seconds4000_0days = [("days", 0), ("hours", 1), ("minutes", 6)]
        assert describe(seconds4000_0days) == "0 araw 1 oras 6 minuto mula ngayon"
        seconds4000 = [("hours", 1), ("minutes", 6)]
        assert describe(seconds4000) == "1 oras 6 minuto mula ngayon"
        assert describe(seconds4000, only_distance=True) == "1 oras 6 minuto"
        seconds3700 = [("hours", 1), ("minutes", 1)]
        assert describe(seconds3700) == "1 oras 1 minuto mula ngayon"
        seconds300_0hours = [("hours", 0), ("minutes", 5)]
        assert describe(seconds300_0hours) == "0 oras 5 minuto mula ngayon"
        seconds300 = [("minutes", 5)]
        assert describe(seconds300) == "5 minuto mula ngayon"
        seconds60 = [("minutes", 1)]
        assert describe(seconds60) == "1 minuto mula ngayon"
        assert describe(seconds60, only_distance=True) == "1 minuto"
        seconds60 = [("seconds", 1)]
        assert describe(seconds60) == "1 segundo mula ngayon"
        assert describe(seconds60, only_distance=True) == "1 segundo"

    def test_ordinal_number_tl(self):
        assert self.locale.ordinal_number(0) == "ika-0"
        assert self.locale.ordinal_number(1) == "ika-1"
        assert self.locale.ordinal_number(2) == "ika-2"
        assert self.locale.ordinal_number(3) == "ika-3"
        assert self.locale.ordinal_number(10) == "ika-10"
        assert self.locale.ordinal_number(23) == "ika-23"
        assert self.locale.ordinal_number(100) == "ika-100"
        assert self.locale.ordinal_number(103) == "ika-103"
        assert self.locale.ordinal_number(114) == "ika-114"


@pytest.mark.usefixtures("lang_locale")
class TestCroatianLocale:
    def test_format_timeframe(self):
        # Now
        assert self.locale._format_timeframe("now", 0) == "upravo sad"

        # Second(s)
        assert self.locale._format_timeframe("second", 1) == "sekundu"
        assert self.locale._format_timeframe("seconds", 3) == "3 sekunde"
        assert self.locale._format_timeframe("seconds", 30) == "30 sekundi"

        # Minute(s)
        assert self.locale._format_timeframe("minute", 1) == "minutu"
        assert self.locale._format_timeframe("minutes", 4) == "4 minute"
        assert self.locale._format_timeframe("minutes", 40) == "40 minuta"

        # Hour(s)
        assert self.locale._format_timeframe("hour", 1) == "sat"
        assert self.locale._format_timeframe("hours", 4) == "4 sata"
        assert self.locale._format_timeframe("hours", 23) == "23 sati"

        # Day(s)
        assert self.locale._format_timeframe("day", 1) == "jedan dan"
        assert self.locale._format_timeframe("days", 4) == "4 dana"
        assert self.locale._format_timeframe("days", 12) == "12 dana"

        # Week(s)
        assert self.locale._format_timeframe("week", 1) == "tjedan"
        assert self.locale._format_timeframe("weeks", 4) == "4 tjedna"
        assert self.locale._format_timeframe("weeks", 12) == "12 tjedana"

        # Month(s)
        assert self.locale._format_timeframe("month", 1) == "mjesec"
        assert self.locale._format_timeframe("months", 2) == "2 mjeseca"
        assert self.locale._format_timeframe("months", 11) == "11 mjeseci"

        # Year(s)
        assert self.locale._format_timeframe("year", 1) == "godinu"
        assert self.locale._format_timeframe("years", 2) == "2 godine"
        assert self.locale._format_timeframe("years", 12) == "12 godina"

    def test_weekday(self):
        dt = arrow.Arrow(2015, 4, 11, 17, 30, 00)
        assert self.locale.day_name(dt.isoweekday()) == "subota"
        assert self.locale.day_abbreviation(dt.isoweekday()) == "su"


@pytest.mark.usefixtures("lang_locale")
class TestSerbianLocale:
    def test_format_timeframe(self):
        # Now
        assert self.locale._format_timeframe("now", 0) == "sada"

        # Second(s)
        assert self.locale._format_timeframe("second", 1) == "sekundu"
        assert self.locale._format_timeframe("seconds", 3) == "3 sekunde"
        assert self.locale._format_timeframe("seconds", 30) == "30 sekundi"

        # Minute(s)
        assert self.locale._format_timeframe("minute", 1) == "minutu"
        assert self.locale._format_timeframe("minutes", 4) == "4 minute"
        assert self.locale._format_timeframe("minutes", 40) == "40 minuta"

        # Hour(s)
        assert self.locale._format_timeframe("hour", 1) == "sat"
        assert self.locale._format_timeframe("hours", 3) == "3 sata"
        assert self.locale._format_timeframe("hours", 23) == "23 sati"

        # Day(s)
        assert self.locale._format_timeframe("day", 1) == "dan"
        assert self.locale._format_timeframe("days", 4) == "4 dana"
        assert self.locale._format_timeframe("days", 12) == "12 dana"

        # Week(s)
        assert self.locale._format_timeframe("week", 1) == "nedelju"
        assert self.locale._format_timeframe("weeks", 2) == "2 nedelje"
        assert self.locale._format_timeframe("weeks", 11) == "11 nedelja"

        # Month(s)
        assert self.locale._format_timeframe("month", 1) == "mesec"
        assert self.locale._format_timeframe("months", 2) == "2 meseca"
        assert self.locale._format_timeframe("months", 11) == "11 meseci"

        # Year(s)
        assert self.locale._format_timeframe("year", 1) == "godinu"
        assert self.locale._format_timeframe("years", 2) == "2 godine"
        assert self.locale._format_timeframe("years", 12) == "12 godina"

    def test_weekday(self):
        dt = arrow.Arrow(2015, 4, 11, 17, 30, 00)
        assert self.locale.day_name(dt.isoweekday()) == "subota"
        assert self.locale.day_abbreviation(dt.isoweekday()) == "su"


@pytest.mark.usefixtures("lang_locale")
class TestLatinLocale:
    def test_format_timeframe(self):
        assert self.locale._format_timeframe("now", 0) == "nunc"
        assert self.locale._format_timeframe("second", 1) == "secundum"
        assert self.locale._format_timeframe("seconds", 3) == "3 secundis"
        assert self.locale._format_timeframe("minute", 1) == "minutam"
        assert self.locale._format_timeframe("minutes", 4) == "4 minutis"
        assert self.locale._format_timeframe("hour", 1) == "horam"
        assert self.locale._format_timeframe("hours", 23) == "23 horas"
        assert self.locale._format_timeframe("day", 1) == "diem"
        assert self.locale._format_timeframe("days", 12) == "12 dies"
        assert self.locale._format_timeframe("month", 1) == "mensem"
        assert self.locale._format_timeframe("months", 11) == "11 mensis"
        assert self.locale._format_timeframe("year", 1) == "annum"
        assert self.locale._format_timeframe("years", 2) == "2 annos"

    def test_weekday(self):
        dt = arrow.Arrow(2015, 4, 11, 17, 30, 00)
        assert self.locale.day_name(dt.isoweekday()) == "dies Saturni"


@pytest.mark.usefixtures("lang_locale")
class TestLithuanianLocale:
    def test_format_timeframe(self):
        assert self.locale._format_timeframe("now", 0) == "dabar"
        assert self.locale._format_timeframe("second", 1) == "sekundės"
        assert self.locale._format_timeframe("seconds", 3) == "3 sekundžių"
        assert self.locale._format_timeframe("seconds", 30) == "30 sekundžių"
        assert self.locale._format_timeframe("minute", 1) == "minutės"
        assert self.locale._format_timeframe("minutes", 4) == "4 minučių"
        assert self.locale._format_timeframe("minutes", 40) == "40 minučių"
        assert self.locale._format_timeframe("hour", 1) == "valandos"
        assert self.locale._format_timeframe("hours", 23) == "23 valandų"
        assert self.locale._format_timeframe("day", 1) == "dieną"
        assert self.locale._format_timeframe("days", 12) == "12 dienų"
        assert self.locale._format_timeframe("month", 1) == "mėnesio"
        assert self.locale._format_timeframe("months", 2) == "2 mėnesių"
        assert self.locale._format_timeframe("months", 11) == "11 mėnesių"
        assert self.locale._format_timeframe("year", 1) == "metų"
        assert self.locale._format_timeframe("years", 2) == "2 metų"

    def test_weekday(self):
        dt = arrow.Arrow(2015, 4, 11, 17, 30, 00)
        assert self.locale.day_name(dt.isoweekday()) == "šeštadienis"
        assert self.locale.day_abbreviation(dt.isoweekday()) == "še"


@pytest.mark.usefixtures("lang_locale")
class TestMalayLocale:
    def test_format_timeframe(self):
        assert self.locale._format_timeframe("now", 0) == "sekarang"
        assert self.locale._format_timeframe("second", 1) == "saat"
        assert self.locale._format_timeframe("seconds", 3) == "3 saat"
        assert self.locale._format_timeframe("minute", 1) == "minit"
        assert self.locale._format_timeframe("minutes", 4) == "4 minit"
        assert self.locale._format_timeframe("hour", 1) == "jam"
        assert self.locale._format_timeframe("hours", 23) == "23 jam"
        assert self.locale._format_timeframe("day", 1) == "hari"
        assert self.locale._format_timeframe("days", 12) == "12 hari"
        assert self.locale._format_timeframe("month", 1) == "bulan"
        assert self.locale._format_timeframe("months", 2) == "2 bulan"
        assert self.locale._format_timeframe("year", 1) == "tahun"
        assert self.locale._format_timeframe("years", 2) == "2 tahun"

    def test_weekday(self):
        dt = arrow.Arrow(2015, 4, 11, 17, 30, 00)
        assert self.locale.day_name(dt.isoweekday()) == "Sabtu"


@pytest.mark.usefixtures("lang_locale")
class TestSamiLocale:
    def test_format_timeframe(self):
        assert self.locale._format_timeframe("now", 0) == "dál"
        assert self.locale._format_timeframe("second", 1) == "sekunda"
        assert self.locale._format_timeframe("seconds", 3) == "3 sekundda"
        assert self.locale._format_timeframe("minute", 1) == "minuhta"
        assert self.locale._format_timeframe("minutes", 4) == "4 minuhta"
        assert self.locale._format_timeframe("hour", 1) == "diimmu"
        assert self.locale._format_timeframe("hours", 23) == "23 diimmu"
        assert self.locale._format_timeframe("day", 1) == "beaivvi"
        assert self.locale._format_timeframe("days", 12) == "12 beaivvi"
        assert self.locale._format_timeframe("month", 1) == "mánu"
        assert self.locale._format_timeframe("months", 2) == "2 mánu"
        assert self.locale._format_timeframe("year", 1) == "jagi"
        assert self.locale._format_timeframe("years", 2) == "2 jagi"

    def test_weekday(self):
        dt = arrow.Arrow(2015, 4, 11, 17, 30, 00)
        assert self.locale.day_name(dt.isoweekday()) == "Lávvordat"


@pytest.mark.usefixtures("lang_locale")
class TestZuluLocale:
    def test_format_timeframe(self):
        # Now
        assert self.locale._format_timeframe("now", 0) == "manje"

        # Second(s)
        assert self.locale._format_timeframe("second", -1) == "umzuzwana"
        assert self.locale._format_timeframe("second", 1) == "ngomzuzwana"
        assert self.locale._format_timeframe("seconds", -3) == "3 imizuzwana"
        assert self.locale._format_timeframe("seconds", 3) == "3 ngemizuzwana"

        # Minute(s)
        assert self.locale._format_timeframe("minute", -1) == "umzuzu"
        assert self.locale._format_timeframe("minute", 1) == "ngomzuzu"
        assert self.locale._format_timeframe("minutes", -4) == "4 imizuzu"
        assert self.locale._format_timeframe("minutes", 4) == "4 ngemizuzu"

        # Hour(s)
        assert self.locale._format_timeframe("hour", -1) == "ihora"
        assert self.locale._format_timeframe("hour", 1) == "ngehora"
        assert self.locale._format_timeframe("hours", -23) == "23 amahora"
        assert self.locale._format_timeframe("hours", 23) == "23 emahoreni"

        # Day(s)
        assert self.locale._format_timeframe("day", -1) == "usuku"
        assert self.locale._format_timeframe("day", 1) == "ngosuku"
        assert self.locale._format_timeframe("days", -12) == "12 izinsuku"
        assert self.locale._format_timeframe("days", 12) == "12 ezinsukwini"

        # Day(s)
        assert self.locale._format_timeframe("week", -1) == "isonto"
        assert self.locale._format_timeframe("week", 1) == "ngesonto"
        assert self.locale._format_timeframe("weeks", -12) == "12 amasonto"
        assert self.locale._format_timeframe("weeks", 12) == "12 emasontweni"

        # Month(s)
        assert self.locale._format_timeframe("month", -1) == "inyanga"
        assert self.locale._format_timeframe("month", 1) == "ngenyanga"
        assert self.locale._format_timeframe("months", -2) == "2 izinyanga"
        assert self.locale._format_timeframe("months", 2) == "2 ezinyangeni"

        # Year(s)
        assert self.locale._format_timeframe("year", -1) == "unyaka"
        assert self.locale._format_timeframe("year", 1) == "ngonyak"
        assert self.locale._format_timeframe("years", -2) == "2 iminyaka"
        assert self.locale._format_timeframe("years", 2) == "2 eminyakeni"

    def test_weekday(self):
        dt = arrow.Arrow(2015, 4, 11, 17, 30, 00)
        assert self.locale.day_name(dt.isoweekday()) == "uMgqibelo"


@pytest.mark.usefixtures("lang_locale")
class TestAlbanianLocale:
    def test_format_timeframe(self):
        assert self.locale._format_timeframe("now", 0) == "tani"
        assert self.locale._format_timeframe("second", -1) == "sekondë"
        assert self.locale._format_timeframe("second", 1) == "sekondë"
        assert self.locale._format_timeframe("seconds", -3) == "3 sekonda"
        assert self.locale._format_timeframe("minute", 1) == "minutë"
        assert self.locale._format_timeframe("minutes", -4) == "4 minuta"
        assert self.locale._format_timeframe("hour", 1) == "orë"
        assert self.locale._format_timeframe("hours", -23) == "23 orë"
        assert self.locale._format_timeframe("day", 1) == "ditë"
        assert self.locale._format_timeframe("days", -12) == "12 ditë"
        assert self.locale._format_timeframe("week", 1) == "javë"
        assert self.locale._format_timeframe("weeks", -12) == "12 javë"
        assert self.locale._format_timeframe("month", 1) == "muaj"
        assert self.locale._format_timeframe("months", -2) == "2 muaj"
        assert self.locale._format_timeframe("year", 1) == "vit"
        assert self.locale._format_timeframe("years", -2) == "2 vjet"

    def test_weekday_and_month(self):
        dt = arrow.Arrow(2015, 4, 11, 17, 30, 00)
        # Saturday
        assert self.locale.day_name(dt.isoweekday()) == "e shtunë"
        assert self.locale.day_abbreviation(dt.isoweekday()) == "sht"
        # June
        assert self.locale.month_name(dt.isoweekday()) == "qershor"
        assert self.locale.month_abbreviation(dt.isoweekday()) == "qer"


@pytest.mark.usefixtures("lang_locale")
class TestUrduLocale:
    def test_format_timeframe(self):
        assert self.locale._format_timeframe("now", 0) == "ابھی"
        assert self.locale._format_timeframe("second", -1) == "ایک سیکنڈ"
        assert self.locale._format_timeframe("second", 1) == "ایک سیکنڈ"
        assert self.locale._format_timeframe("seconds", -3) == "3 سیکنڈ"
        assert self.locale._format_timeframe("minute", 1) == "ایک منٹ"
        assert self.locale._format_timeframe("minutes", -4) == "4 منٹ"
        assert self.locale._format_timeframe("hour", 1) == "ایک گھنٹے"
        assert self.locale._format_timeframe("hours", -23) == "23 گھنٹے"
        assert self.locale._format_timeframe("day", 1) == "ایک دن"
        assert self.locale._format_timeframe("days", -12) == "12 دن"
        assert self.locale._format_timeframe("week", 1) == "ایک ہفتے"
        assert self.locale._format_timeframe("weeks", -12) == "12 ہفتے"
        assert self.locale._format_timeframe("month", 1) == "ایک مہینہ"
        assert self.locale._format_timeframe("months", -2) == "2 ماہ"
        assert self.locale._format_timeframe("year", 1) == "ایک سال"
        assert self.locale._format_timeframe("years", -2) == "2 سال"

    def test_weekday_and_month(self):
        dt = arrow.Arrow(2015, 4, 11, 17, 30, 00)
        # Saturday
        assert self.locale.day_name(dt.isoweekday()) == "ہفتہ"
        assert self.locale.day_abbreviation(dt.isoweekday()) == "ہفتہ"
        # June
        assert self.locale.month_name(dt.isoweekday()) == "جون"
        assert self.locale.month_abbreviation(dt.isoweekday()) == "جون"


@pytest.mark.usefixtures("lang_locale")
class TestEstonianLocale:
    def test_format_timeframe(self):
        assert self.locale._format_timeframe("now", 0) == "just nüüd"
        assert self.locale._format_timeframe("second", 1) == "ühe sekundi"
        assert self.locale._format_timeframe("seconds", 3) == "3 sekundi"
        assert self.locale._format_timeframe("seconds", 30) == "30 sekundi"
        assert self.locale._format_timeframe("minute", 1) == "ühe minuti"
        assert self.locale._format_timeframe("minutes", 4) == "4 minuti"
        assert self.locale._format_timeframe("minutes", 40) == "40 minuti"
        assert self.locale._format_timeframe("hour", 1) == "tunni aja"
        assert self.locale._format_timeframe("hours", 5) == "5 tunni"
        assert self.locale._format_timeframe("hours", 23) == "23 tunni"
        assert self.locale._format_timeframe("day", 1) == "ühe päeva"
        assert self.locale._format_timeframe("days", 6) == "6 päeva"
        assert self.locale._format_timeframe("days", 12) == "12 päeva"
        assert self.locale._format_timeframe("month", 1) == "ühe kuu"
        assert self.locale._format_timeframe("months", 7) == "7 kuu"
        assert self.locale._format_timeframe("months", 11) == "11 kuu"
        assert self.locale._format_timeframe("year", 1) == "ühe aasta"
        assert self.locale._format_timeframe("years", 8) == "8 aasta"
        assert self.locale._format_timeframe("years", 12) == "12 aasta"

        assert self.locale._format_timeframe("now", 0) == "just nüüd"
        assert self.locale._format_timeframe("second", -1) == "üks sekund"
        assert self.locale._format_timeframe("seconds", -9) == "9 sekundit"
        assert self.locale._format_timeframe("seconds", -12) == "12 sekundit"
        assert self.locale._format_timeframe("minute", -1) == "üks minut"
        assert self.locale._format_timeframe("minutes", -2) == "2 minutit"
        assert self.locale._format_timeframe("minutes", -10) == "10 minutit"
        assert self.locale._format_timeframe("hour", -1) == "tund aega"
        assert self.locale._format_timeframe("hours", -3) == "3 tundi"
        assert self.locale._format_timeframe("hours", -11) == "11 tundi"
        assert self.locale._format_timeframe("day", -1) == "üks päev"
        assert self.locale._format_timeframe("days", -2) == "2 päeva"
        assert self.locale._format_timeframe("days", -12) == "12 päeva"
        assert self.locale._format_timeframe("month", -1) == "üks kuu"
        assert self.locale._format_timeframe("months", -3) == "3 kuud"
        assert self.locale._format_timeframe("months", -13) == "13 kuud"
        assert self.locale._format_timeframe("year", -1) == "üks aasta"
        assert self.locale._format_timeframe("years", -4) == "4 aastat"
        assert self.locale._format_timeframe("years", -14) == "14 aastat"


@pytest.mark.usefixtures("lang_locale")
class TestPortugueseLocale:
    def test_format_timeframe(self):
        assert self.locale._format_timeframe("now", 0) == "agora"
        assert self.locale._format_timeframe("second", 1) == "um segundo"
        assert self.locale._format_timeframe("seconds", 30) == "30 segundos"
        assert self.locale._format_timeframe("minute", 1) == "um minuto"
        assert self.locale._format_timeframe("minutes", 40) == "40 minutos"
        assert self.locale._format_timeframe("hour", 1) == "uma hora"
        assert self.locale._format_timeframe("hours", 23) == "23 horas"
        assert self.locale._format_timeframe("day", 1) == "um dia"
        assert self.locale._format_timeframe("days", 12) == "12 dias"
        assert self.locale._format_timeframe("month", 1) == "um mês"
        assert self.locale._format_timeframe("months", 11) == "11 meses"
        assert self.locale._format_timeframe("year", 1) == "um ano"
        assert self.locale._format_timeframe("years", 12) == "12 anos"


@pytest.mark.usefixtures("lang_locale")
class TestLatvianLocale:
    def test_format_timeframe(self):
        assert self.locale._format_timeframe("now", 0) == "tagad"
        assert self.locale._format_timeframe("second", 1) == "sekundes"
        assert self.locale._format_timeframe("seconds", 3) == "3 sekundēm"
        assert self.locale._format_timeframe("seconds", 30) == "30 sekundēm"
        assert self.locale._format_timeframe("minute", 1) == "minūtes"
        assert self.locale._format_timeframe("minutes", 4) == "4 minūtēm"
        assert self.locale._format_timeframe("minutes", 40) == "40 minūtēm"
        assert self.locale._format_timeframe("hour", 1) == "stundas"
        assert self.locale._format_timeframe("hours", 23) == "23 stundām"
        assert self.locale._format_timeframe("day", 1) == "dienas"
        assert self.locale._format_timeframe("days", 12) == "12 dienām"
        assert self.locale._format_timeframe("month", 1) == "mēneša"
        assert self.locale._format_timeframe("months", 2) == "2 mēnešiem"
        assert self.locale._format_timeframe("months", 11) == "11 mēnešiem"
        assert self.locale._format_timeframe("year", 1) == "gada"
        assert self.locale._format_timeframe("years", 2) == "2 gadiem"
        assert self.locale._format_timeframe("years", 12) == "12 gadiem"

    def test_weekday(self):
        dt = arrow.Arrow(2015, 4, 11, 17, 30, 00)
        assert self.locale.day_name(dt.isoweekday()) == "sestdiena"
        assert self.locale.day_abbreviation(dt.isoweekday()) == "se"


@pytest.mark.usefixtures("lang_locale")
class TestBrazilianPortugueseLocale:
    def test_format_timeframe(self):
        assert self.locale._format_timeframe("now", 0) == "agora"
        assert self.locale._format_timeframe("second", 1) == "um segundo"
        assert self.locale._format_timeframe("seconds", 30) == "30 segundos"
        assert self.locale._format_timeframe("minute", 1) == "um minuto"
        assert self.locale._format_timeframe("minutes", 40) == "40 minutos"
        assert self.locale._format_timeframe("hour", 1) == "uma hora"
        assert self.locale._format_timeframe("hours", 23) == "23 horas"
        assert self.locale._format_timeframe("day", 1) == "um dia"
        assert self.locale._format_timeframe("days", 12) == "12 dias"
        assert self.locale._format_timeframe("month", 1) == "um mês"
        assert self.locale._format_timeframe("months", 11) == "11 meses"
        assert self.locale._format_timeframe("year", 1) == "um ano"
        assert self.locale._format_timeframe("years", 12) == "12 anos"
        assert self.locale._format_relative("uma hora", "hour", -1) == "faz uma hora"


@pytest.mark.usefixtures("lang_locale")
class TestHongKongLocale:
    def test_format_timeframe(self):
        assert self.locale._format_timeframe("now", 0) == "剛才"
        assert self.locale._format_timeframe("second", 1) == "1秒"
        assert self.locale._format_timeframe("seconds", 30) == "30秒"
        assert self.locale._format_timeframe("minute", 1) == "1分鐘"
        assert self.locale._format_timeframe("minutes", 40) == "40分鐘"
        assert self.locale._format_timeframe("hour", 1) == "1小時"
        assert self.locale._format_timeframe("hours", 23) == "23小時"
        assert self.locale._format_timeframe("day", 1) == "1天"
        assert self.locale._format_timeframe("days", 12) == "12天"
        assert self.locale._format_timeframe("week", 1) == "1星期"
        assert self.locale._format_timeframe("weeks", 38) == "38星期"
        assert self.locale._format_timeframe("month", 1) == "1個月"
        assert self.locale._format_timeframe("months", 11) == "11個月"
        assert self.locale._format_timeframe("year", 1) == "1年"
        assert self.locale._format_timeframe("years", 12) == "12年"

        assert self.locale._format_timeframe("second", -1) == "1秒"
        assert self.locale._format_timeframe("seconds", -30) == "30秒"
        assert self.locale._format_timeframe("minute", -1) == "1分鐘"
        assert self.locale._format_timeframe("minutes", -40) == "40分鐘"
        assert self.locale._format_timeframe("hour", -1) == "1小時"
        assert self.locale._format_timeframe("hours", -23) == "23小時"
        assert self.locale._format_timeframe("day", -1) == "1天"
        assert self.locale._format_timeframe("days", -12) == "12天"
        assert self.locale._format_timeframe("week", -1) == "1星期"
        assert self.locale._format_timeframe("weeks", -38) == "38星期"
        assert self.locale._format_timeframe("month", -1) == "1個月"
        assert self.locale._format_timeframe("months", -11) == "11個月"
        assert self.locale._format_timeframe("year", -1) == "1年"
        assert self.locale._format_timeframe("years", -12) == "12年"

    def test_format_relative_now(self):
        assert self.locale._format_relative("剛才", "now", 0) == "剛才"

    def test_format_relative_past(self):
        assert self.locale._format_relative("1秒", "second", 1) == "1秒後"
        assert self.locale._format_relative("2秒", "seconds", 2) == "2秒後"
        assert self.locale._format_relative("1分鐘", "minute", 1) == "1分鐘後"
        assert self.locale._format_relative("2分鐘", "minutes", 2) == "2分鐘後"
        assert self.locale._format_relative("1小時", "hour", 1) == "1小時後"
        assert self.locale._format_relative("2小時", "hours", 2) == "2小時後"
        assert self.locale._format_relative("1天", "day", 1) == "1天後"
        assert self.locale._format_relative("2天", "days", 2) == "2天後"
        assert self.locale._format_relative("1星期", "week", 1) == "1星期後"
        assert self.locale._format_relative("2星期", "weeks", 2) == "2星期後"
        assert self.locale._format_relative("1個月", "month", 1) == "1個月後"
        assert self.locale._format_relative("2個月", "months", 2) == "2個月後"
        assert self.locale._format_relative("1年", "year", 1) == "1年後"
        assert self.locale._format_relative("2年", "years", 2) == "2年後"

    def test_format_relative_future(self):
        assert self.locale._format_relative("1秒", "second", -1) == "1秒前"
        assert self.locale._format_relative("2秒", "seconds", -2) == "2秒前"
        assert self.locale._format_relative("1分鐘", "minute", -1) == "1分鐘前"
        assert self.locale._format_relative("2分鐘", "minutes", -2) == "2分鐘前"
        assert self.locale._format_relative("1小時", "hour", -1) == "1小時前"
        assert self.locale._format_relative("2小時", "hours", -2) == "2小時前"
        assert self.locale._format_relative("1天", "day", -1) == "1天前"
        assert self.locale._format_relative("2天", "days", -2) == "2天前"
        assert self.locale._format_relative("1星期", "week", -1) == "1星期前"
        assert self.locale._format_relative("2星期", "weeks", -2) == "2星期前"
        assert self.locale._format_relative("1個月", "month", -1) == "1個月前"
        assert self.locale._format_relative("2個月", "months", -2) == "2個月前"
        assert self.locale._format_relative("1年", "year", -1) == "1年前"
        assert self.locale._format_relative("2年", "years", -2) == "2年前"


@pytest.mark.usefixtures("lang_locale")
class TestChineseTWLocale:
    def test_format_timeframe(self):
        assert self.locale._format_timeframe("now", 0) == "剛才"
        assert self.locale._format_timeframe("second", 1) == "1秒"
        assert self.locale._format_timeframe("seconds", 30) == "30秒"
        assert self.locale._format_timeframe("minute", 1) == "1分鐘"
        assert self.locale._format_timeframe("minutes", 40) == "40分鐘"
        assert self.locale._format_timeframe("hour", 1) == "1小時"
        assert self.locale._format_timeframe("hours", 23) == "23小時"
        assert self.locale._format_timeframe("day", 1) == "1天"
        assert self.locale._format_timeframe("days", 12) == "12天"
        assert self.locale._format_timeframe("week", 1) == "1週"
        assert self.locale._format_timeframe("weeks", 38) == "38週"
        assert self.locale._format_timeframe("month", 1) == "1個月"
        assert self.locale._format_timeframe("months", 11) == "11個月"
        assert self.locale._format_timeframe("year", 1) == "1年"
        assert self.locale._format_timeframe("years", 12) == "12年"

        assert self.locale._format_timeframe("second", -1) == "1秒"
        assert self.locale._format_timeframe("seconds", -30) == "30秒"
        assert self.locale._format_timeframe("minute", -1) == "1分鐘"
        assert self.locale._format_timeframe("minutes", -40) == "40分鐘"
        assert self.locale._format_timeframe("hour", -1) == "1小時"
        assert self.locale._format_timeframe("hours", -23) == "23小時"
        assert self.locale._format_timeframe("day", -1) == "1天"
        assert self.locale._format_timeframe("days", -12) == "12天"
        assert self.locale._format_timeframe("week", -1) == "1週"
        assert self.locale._format_timeframe("weeks", -38) == "38週"
        assert self.locale._format_timeframe("month", -1) == "1個月"
        assert self.locale._format_timeframe("months", -11) == "11個月"
        assert self.locale._format_timeframe("year", -1) == "1年"
        assert self.locale._format_timeframe("years", -12) == "12年"

    def test_format_relative_now(self):
        assert self.locale._format_relative("剛才", "now", 0) == "剛才"

    def test_format_relative_past(self):
        assert self.locale._format_relative("1秒", "second", 1) == "1秒後"
        assert self.locale._format_relative("2秒", "seconds", 2) == "2秒後"
        assert self.locale._format_relative("1分鐘", "minute", 1) == "1分鐘後"
        assert self.locale._format_relative("2分鐘", "minutes", 2) == "2分鐘後"
        assert self.locale._format_relative("1小時", "hour", 1) == "1小時後"
        assert self.locale._format_relative("2小時", "hours", 2) == "2小時後"
        assert self.locale._format_relative("1天", "day", 1) == "1天後"
        assert self.locale._format_relative("2天", "days", 2) == "2天後"
        assert self.locale._format_relative("1週", "week", 1) == "1週後"
        assert self.locale._format_relative("2週", "weeks", 2) == "2週後"
        assert self.locale._format_relative("1個月", "month", 1) == "1個月後"
        assert self.locale._format_relative("2個月", "months", 2) == "2個月後"
        assert self.locale._format_relative("1年", "year", 1) == "1年後"
        assert self.locale._format_relative("2年", "years", 2) == "2年後"

    def test_format_relative_future(self):
        assert self.locale._format_relative("1秒", "second", -1) == "1秒前"
        assert self.locale._format_relative("2秒", "seconds", -2) == "2秒前"
        assert self.locale._format_relative("1分鐘", "minute", -1) == "1分鐘前"
        assert self.locale._format_relative("2分鐘", "minutes", -2) == "2分鐘前"
        assert self.locale._format_relative("1小時", "hour", -1) == "1小時前"
        assert self.locale._format_relative("2小時", "hours", -2) == "2小時前"
        assert self.locale._format_relative("1天", "day", -1) == "1天前"
        assert self.locale._format_relative("2天", "days", -2) == "2天前"
        assert self.locale._format_relative("1週", "week", -1) == "1週前"
        assert self.locale._format_relative("2週", "weeks", -2) == "2週前"
        assert self.locale._format_relative("1個月", "month", -1) == "1個月前"
        assert self.locale._format_relative("2個月", "months", -2) == "2個月前"
        assert self.locale._format_relative("1年", "year", -1) == "1年前"
        assert self.locale._format_relative("2年", "years", -2) == "2年前"


@pytest.mark.usefixtures("lang_locale")
class TestChineseCNLocale:
    def test_format_timeframe(self):
        assert self.locale._format_timeframe("now", 0) == "刚才"
        assert self.locale._format_timeframe("second", 1) == "1秒"
        assert self.locale._format_timeframe("seconds", 30) == "30秒"
        assert self.locale._format_timeframe("minute", 1) == "1分钟"
        assert self.locale._format_timeframe("minutes", 40) == "40分钟"
        assert self.locale._format_timeframe("hour", 1) == "1小时"
        assert self.locale._format_timeframe("hours", 23) == "23小时"
        assert self.locale._format_timeframe("day", 1) == "1天"
        assert self.locale._format_timeframe("days", 12) == "12天"
        assert self.locale._format_timeframe("week", 1) == "1周"
        assert self.locale._format_timeframe("weeks", 38) == "38周"
        assert self.locale._format_timeframe("month", 1) == "1个月"
        assert self.locale._format_timeframe("months", 11) == "11个月"
        assert self.locale._format_timeframe("year", 1) == "1年"
        assert self.locale._format_timeframe("years", 12) == "12年"

        assert self.locale._format_timeframe("second", -1) == "1秒"
        assert self.locale._format_timeframe("seconds", -30) == "30秒"
        assert self.locale._format_timeframe("minute", -1) == "1分钟"
        assert self.locale._format_timeframe("minutes", -40) == "40分钟"
        assert self.locale._format_timeframe("hour", -1) == "1小时"
        assert self.locale._format_timeframe("hours", -23) == "23小时"
        assert self.locale._format_timeframe("day", -1) == "1天"
        assert self.locale._format_timeframe("days", -12) == "12天"
        assert self.locale._format_timeframe("week", -1) == "1周"
        assert self.locale._format_timeframe("weeks", -38) == "38周"
        assert self.locale._format_timeframe("month", -1) == "1个月"
        assert self.locale._format_timeframe("months", -11) == "11个月"
        assert self.locale._format_timeframe("year", -1) == "1年"
        assert self.locale._format_timeframe("years", -12) == "12年"

    def test_format_relative_now(self):
        assert self.locale._format_relative("刚才", "now", 0) == "刚才"

    def test_format_relative_past(self):
        assert self.locale._format_relative("1秒", "second", 1) == "1秒后"
        assert self.locale._format_relative("2秒", "seconds", 2) == "2秒后"
        assert self.locale._format_relative("1分钟", "minute", 1) == "1分钟后"
        assert self.locale._format_relative("2分钟", "minutes", 2) == "2分钟后"
        assert self.locale._format_relative("1小时", "hour", 1) == "1小时后"
        assert self.locale._format_relative("2小时", "hours", 2) == "2小时后"
        assert self.locale._format_relative("1天", "day", 1) == "1天后"
        assert self.locale._format_relative("2天", "days", 2) == "2天后"
        assert self.locale._format_relative("1周", "week", 1) == "1周后"
        assert self.locale._format_relative("2周", "weeks", 2) == "2周后"
        assert self.locale._format_relative("1个月", "month", 1) == "1个月后"
        assert self.locale._format_relative("2个月", "months", 2) == "2个月后"
        assert self.locale._format_relative("1年", "year", 1) == "1年后"
        assert self.locale._format_relative("2年", "years", 2) == "2年后"

    def test_format_relative_future(self):
        assert self.locale._format_relative("1秒", "second", -1) == "1秒前"
        assert self.locale._format_relative("2秒", "seconds", -2) == "2秒前"
        assert self.locale._format_relative("1分钟", "minute", -1) == "1分钟前"
        assert self.locale._format_relative("2分钟", "minutes", -2) == "2分钟前"
        assert self.locale._format_relative("1小时", "hour", -1) == "1小时前"
        assert self.locale._format_relative("2小时", "hours", -2) == "2小时前"
        assert self.locale._format_relative("1天", "day", -1) == "1天前"
        assert self.locale._format_relative("2天", "days", -2) == "2天前"
        assert self.locale._format_relative("1周", "week", -1) == "1周前"
        assert self.locale._format_relative("2周", "weeks", -2) == "2周前"
        assert self.locale._format_relative("1个月", "month", -1) == "1个月前"
        assert self.locale._format_relative("2个月", "months", -2) == "2个月前"
        assert self.locale._format_relative("1年", "year", -1) == "1年前"
        assert self.locale._format_relative("2年", "years", -2) == "2年前"


@pytest.mark.usefixtures("lang_locale")
class TestSwahiliLocale:
    def test_format_timeframe(self):
        assert self.locale._format_timeframe("now", 0) == "sasa hivi"
        assert self.locale._format_timeframe("second", 1) == "sekunde"
        assert self.locale._format_timeframe("seconds", 3) == "sekunde 3"
        assert self.locale._format_timeframe("seconds", 30) == "sekunde 30"
        assert self.locale._format_timeframe("minute", 1) == "dakika moja"
        assert self.locale._format_timeframe("minutes", 4) == "dakika 4"
        assert self.locale._format_timeframe("minutes", 40) == "dakika 40"
        assert self.locale._format_timeframe("hour", 1) == "saa moja"
        assert self.locale._format_timeframe("hours", 5) == "saa 5"
        assert self.locale._format_timeframe("hours", 23) == "saa 23"
        assert self.locale._format_timeframe("day", 1) == "siku moja"
        assert self.locale._format_timeframe("days", 6) == "siku 6"
        assert self.locale._format_timeframe("days", 12) == "siku 12"
        assert self.locale._format_timeframe("month", 1) == "mwezi moja"
        assert self.locale._format_timeframe("months", 7) == "miezi 7"
        assert self.locale._format_timeframe("week", 1) == "wiki moja"
        assert self.locale._format_timeframe("weeks", 2) == "wiki 2"
        assert self.locale._format_timeframe("months", 11) == "miezi 11"
        assert self.locale._format_timeframe("year", 1) == "mwaka moja"
        assert self.locale._format_timeframe("years", 8) == "miaka 8"
        assert self.locale._format_timeframe("years", 12) == "miaka 12"

    def test_format_relative_now(self):
        result = self.locale._format_relative("sasa hivi", "now", 0)
        assert result == "sasa hivi"

    def test_format_relative_past(self):
        result = self.locale._format_relative("saa moja", "hour", 1)
        assert result == "muda wa saa moja"

    def test_format_relative_future(self):
        result = self.locale._format_relative("saa moja", "hour", -1)
        assert result == "saa moja iliyopita"


@pytest.mark.usefixtures("lang_locale")
class TestKoreanLocale:
    def test_format_timeframe(self):
        assert self.locale._format_timeframe("now", 0) == "지금"
        assert self.locale._format_timeframe("second", 1) == "1초"
        assert self.locale._format_timeframe("seconds", 2) == "2초"
        assert self.locale._format_timeframe("minute", 1) == "1분"
        assert self.locale._format_timeframe("minutes", 2) == "2분"
        assert self.locale._format_timeframe("hour", 1) == "한시간"
        assert self.locale._format_timeframe("hours", 2) == "2시간"
        assert self.locale._format_timeframe("day", 1) == "하루"
        assert self.locale._format_timeframe("days", 2) == "2일"
        assert self.locale._format_timeframe("week", 1) == "1주"
        assert self.locale._format_timeframe("weeks", 2) == "2주"
        assert self.locale._format_timeframe("month", 1) == "한달"
        assert self.locale._format_timeframe("months", 2) == "2개월"
        assert self.locale._format_timeframe("year", 1) == "1년"
        assert self.locale._format_timeframe("years", 2) == "2년"

    def test_format_relative(self):
        assert self.locale._format_relative("지금", "now", 0) == "지금"

        assert self.locale._format_relative("1초", "second", 1) == "1초 후"
        assert self.locale._format_relative("2초", "seconds", 2) == "2초 후"
        assert self.locale._format_relative("1분", "minute", 1) == "1분 후"
        assert self.locale._format_relative("2분", "minutes", 2) == "2분 후"
        assert self.locale._format_relative("한시간", "hour", 1) == "한시간 후"
        assert self.locale._format_relative("2시간", "hours", 2) == "2시간 후"
        assert self.locale._format_relative("하루", "day", 1) == "내일"
        assert self.locale._format_relative("2일", "days", 2) == "모레"
        assert self.locale._format_relative("3일", "days", 3) == "글피"
        assert self.locale._format_relative("4일", "days", 4) == "그글피"
        assert self.locale._format_relative("5일", "days", 5) == "5일 후"
        assert self.locale._format_relative("1주", "week", 1) == "1주 후"
        assert self.locale._format_relative("2주", "weeks", 2) == "2주 후"
        assert self.locale._format_relative("한달", "month", 1) == "한달 후"
        assert self.locale._format_relative("2개월", "months", 2) == "2개월 후"
        assert self.locale._format_relative("1년", "year", 1) == "내년"
        assert self.locale._format_relative("2년", "years", 2) == "내후년"
        assert self.locale._format_relative("3년", "years", 3) == "3년 후"

        assert self.locale._format_relative("1초", "second", -1) == "1초 전"
        assert self.locale._format_relative("2초", "seconds", -2) == "2초 전"
        assert self.locale._format_relative("1분", "minute", -1) == "1분 전"
        assert self.locale._format_relative("2분", "minutes", -2) == "2분 전"
        assert self.locale._format_relative("한시간", "hour", -1) == "한시간 전"
        assert self.locale._format_relative("2시간", "hours", -2) == "2시간 전"
        assert self.locale._format_relative("하루", "day", -1) == "어제"
        assert self.locale._format_relative("2일", "days", -2) == "그제"
        assert self.locale._format_relative("3일", "days", -3) == "그끄제"
        assert self.locale._format_relative("4일", "days", -4) == "4일 전"
        assert self.locale._format_relative("1주", "week", -1) == "1주 전"
        assert self.locale._format_relative("2주", "weeks", -2) == "2주 전"
        assert self.locale._format_relative("한달", "month", -1) == "한달 전"
        assert self.locale._format_relative("2개월", "months", -2) == "2개월 전"
        assert self.locale._format_relative("1년", "year", -1) == "작년"
        assert self.locale._format_relative("2년", "years", -2) == "제작년"
        assert self.locale._format_relative("3년", "years", -3) == "3년 전"

    def test_ordinal_number(self):
        assert self.locale.ordinal_number(0) == "0번째"
        assert self.locale.ordinal_number(1) == "첫번째"
        assert self.locale.ordinal_number(2) == "두번째"
        assert self.locale.ordinal_number(3) == "세번째"
        assert self.locale.ordinal_number(4) == "네번째"
        assert self.locale.ordinal_number(5) == "다섯번째"
        assert self.locale.ordinal_number(6) == "여섯번째"
        assert self.locale.ordinal_number(7) == "일곱번째"
        assert self.locale.ordinal_number(8) == "여덟번째"
        assert self.locale.ordinal_number(9) == "아홉번째"
        assert self.locale.ordinal_number(10) == "열번째"
        assert self.locale.ordinal_number(11) == "11번째"
        assert self.locale.ordinal_number(12) == "12번째"
        assert self.locale.ordinal_number(100) == "100번째"


@pytest.mark.usefixtures("lang_locale")
class TestDutchLocale:
    def test_plurals(self):
        assert self.locale._format_timeframe("now", 0) == "nu"
        assert self.locale._format_timeframe("second", 1) == "een seconde"
        assert self.locale._format_timeframe("seconds", 30) == "30 seconden"
        assert self.locale._format_timeframe("minute", 1) == "een minuut"
        assert self.locale._format_timeframe("minutes", 40) == "40 minuten"
        assert self.locale._format_timeframe("hour", 1) == "een uur"
        assert self.locale._format_timeframe("hours", 23) == "23 uur"
        assert self.locale._format_timeframe("day", 1) == "een dag"
        assert self.locale._format_timeframe("days", 12) == "12 dagen"
        assert self.locale._format_timeframe("week", 1) == "een week"
        assert self.locale._format_timeframe("weeks", 38) == "38 weken"
        assert self.locale._format_timeframe("month", 1) == "een maand"
        assert self.locale._format_timeframe("months", 11) == "11 maanden"
        assert self.locale._format_timeframe("year", 1) == "een jaar"
        assert self.locale._format_timeframe("years", 12) == "12 jaar"


@pytest.mark.usefixtures("lang_locale")
class TestJapaneseLocale:
    def test_format_timeframe(self):
        assert self.locale._format_timeframe("now", 0) == "現在"
        assert self.locale._format_timeframe("second", 1) == "1秒"
        assert self.locale._format_timeframe("seconds", 30) == "30秒"
        assert self.locale._format_timeframe("minute", 1) == "1分"
        assert self.locale._format_timeframe("minutes", 40) == "40分"
        assert self.locale._format_timeframe("hour", 1) == "1時間"
        assert self.locale._format_timeframe("hours", 23) == "23時間"
        assert self.locale._format_timeframe("day", 1) == "1日"
        assert self.locale._format_timeframe("days", 12) == "12日"
        assert self.locale._format_timeframe("week", 1) == "1週間"
        assert self.locale._format_timeframe("weeks", 38) == "38週間"
        assert self.locale._format_timeframe("month", 1) == "1ヶ月"
        assert self.locale._format_timeframe("months", 11) == "11ヶ月"
        assert self.locale._format_timeframe("year", 1) == "1年"
        assert self.locale._format_timeframe("years", 12) == "12年"


@pytest.mark.usefixtures("lang_locale")
class TestSwedishLocale:
    def test_plurals(self):
        assert self.locale._format_timeframe("now", 0) == "just nu"
        assert self.locale._format_timeframe("second", 1) == "en sekund"
        assert self.locale._format_timeframe("seconds", 30) == "30 sekunder"
        assert self.locale._format_timeframe("minute", 1) == "en minut"
        assert self.locale._format_timeframe("minutes", 40) == "40 minuter"
        assert self.locale._format_timeframe("hour", 1) == "en timme"
        assert self.locale._format_timeframe("hours", 23) == "23 timmar"
        assert self.locale._format_timeframe("day", 1) == "en dag"
        assert self.locale._format_timeframe("days", 12) == "12 dagar"
        assert self.locale._format_timeframe("week", 1) == "en vecka"
        assert self.locale._format_timeframe("weeks", 38) == "38 veckor"
        assert self.locale._format_timeframe("month", 1) == "en månad"
        assert self.locale._format_timeframe("months", 11) == "11 månader"
        assert self.locale._format_timeframe("year", 1) == "ett år"
        assert self.locale._format_timeframe("years", 12) == "12 år"


@pytest.mark.usefixtures("lang_locale")
class TestOdiaLocale:
    def test_ordinal_number(self):
        assert self.locale._ordinal_number(0) == "0ତମ"
        assert self.locale._ordinal_number(1) == "1ମ"
        assert self.locale._ordinal_number(3) == "3ୟ"
        assert self.locale._ordinal_number(4) == "4ର୍ଥ"
        assert self.locale._ordinal_number(5) == "5ମ"
        assert self.locale._ordinal_number(6) == "6ଷ୍ଠ"
        assert self.locale._ordinal_number(10) == "10ମ"
        assert self.locale._ordinal_number(11) == "11ତମ"
        assert self.locale._ordinal_number(42) == "42ତମ"
        assert self.locale._ordinal_number(-1) == ""

    def test_format_timeframe(self):
        assert self.locale._format_timeframe("hours", 2) == "2 ଘଣ୍ଟା"
        assert self.locale._format_timeframe("hour", 0) == "ଏକ ଘଣ୍ଟା"

    def test_format_relative_now(self):
        result = self.locale._format_relative("ବର୍ତ୍ତମାନ", "now", 0)
        assert result == "ବର୍ତ୍ତମାନ"

    def test_format_relative_past(self):
        result = self.locale._format_relative("ଏକ ଘଣ୍ଟା", "hour", 1)
        assert result == "ଏକ ଘଣ୍ଟା ପରେ"

    def test_format_relative_future(self):
        result = self.locale._format_relative("ଏକ ଘଣ୍ଟା", "hour", -1)
        assert result == "ଏକ ଘଣ୍ଟା ପୂର୍ବେ"


@pytest.mark.usefixtures("lang_locale")
class TestTurkishLocale:
    def test_singles_mk(self):
        assert self.locale._format_timeframe("second", 1) == "bir saniye"
        assert self.locale._format_timeframe("minute", 1) == "bir dakika"
        assert self.locale._format_timeframe("hour", 1) == "bir saat"
        assert self.locale._format_timeframe("day", 1) == "bir gün"
        assert self.locale._format_timeframe("week", 1) == "bir hafta"
        assert self.locale._format_timeframe("month", 1) == "bir ay"
        assert self.locale._format_timeframe("year", 1) == "bir yıl"

    def test_meridians_mk(self):
        assert self.locale.meridian(7, "A") == "ÖÖ"
        assert self.locale.meridian(18, "A") == "ÖS"
        assert self.locale.meridian(10, "a") == "öö"
        assert self.locale.meridian(22, "a") == "ös"

    def test_describe_mk(self):
        assert self.locale.describe("second", only_distance=True) == "bir saniye"
        assert self.locale.describe("second", only_distance=False) == "bir saniye sonra"
        assert self.locale.describe("minute", only_distance=True) == "bir dakika"
        assert self.locale.describe("minute", only_distance=False) == "bir dakika sonra"
        assert self.locale.describe("hour", only_distance=True) == "bir saat"
        assert self.locale.describe("hour", only_distance=False) == "bir saat sonra"
        assert self.locale.describe("day", only_distance=True) == "bir gün"
        assert self.locale.describe("day", only_distance=False) == "bir gün sonra"
        assert self.locale.describe("week", only_distance=True) == "bir hafta"
        assert self.locale.describe("week", only_distance=False) == "bir hafta sonra"
        assert self.locale.describe("month", only_distance=True) == "bir ay"
        assert self.locale.describe("month", only_distance=False) == "bir ay sonra"
        assert self.locale.describe("year", only_distance=True) == "bir yıl"
        assert self.locale.describe("year", only_distance=False) == "bir yıl sonra"

    def test_relative_mk(self):
        assert self.locale._format_relative("şimdi", "now", 0) == "şimdi"
        assert (
            self.locale._format_relative("1 saniye", "seconds", 1) == "1 saniye sonra"
        )
        assert (
            self.locale._format_relative("1 saniye", "seconds", -1) == "1 saniye önce"
        )
        assert (
            self.locale._format_relative("1 dakika", "minutes", 1) == "1 dakika sonra"
        )
        assert (
            self.locale._format_relative("1 dakika", "minutes", -1) == "1 dakika önce"
        )
        assert self.locale._format_relative("1 saat", "hours", 1) == "1 saat sonra"
        assert self.locale._format_relative("1 saat", "hours", -1) == "1 saat önce"
        assert self.locale._format_relative("1 gün", "days", 1) == "1 gün sonra"
        assert self.locale._format_relative("1 gün", "days", -1) == "1 gün önce"
        assert self.locale._format_relative("1 hafta", "weeks", 1) == "1 hafta sonra"
        assert self.locale._format_relative("1 hafta", "weeks", -1) == "1 hafta önce"
        assert self.locale._format_relative("1 ay", "months", 1) == "1 ay sonra"
        assert self.locale._format_relative("1 ay", "months", -1) == "1 ay önce"
        assert self.locale._format_relative("1 yıl", "years", 1) == "1 yıl sonra"
        assert self.locale._format_relative("1 yıl", "years", -1) == "1 yıl önce"

    def test_plurals_mk(self):
        assert self.locale._format_timeframe("now", 0) == "şimdi"
        assert self.locale._format_timeframe("second", 1) == "bir saniye"
        assert self.locale._format_timeframe("seconds", 30) == "30 saniye"
        assert self.locale._format_timeframe("minute", 1) == "bir dakika"
        assert self.locale._format_timeframe("minutes", 40) == "40 dakika"
        assert self.locale._format_timeframe("hour", 1) == "bir saat"
        assert self.locale._format_timeframe("hours", 23) == "23 saat"
        assert self.locale._format_timeframe("day", 1) == "bir gün"
        assert self.locale._format_timeframe("days", 12) == "12 gün"
        assert self.locale._format_timeframe("week", 1) == "bir hafta"
        assert self.locale._format_timeframe("weeks", 38) == "38 hafta"
        assert self.locale._format_timeframe("month", 1) == "bir ay"
        assert self.locale._format_timeframe("months", 11) == "11 ay"
        assert self.locale._format_timeframe("year", 1) == "bir yıl"
        assert self.locale._format_timeframe("years", 12) == "12 yıl"


@pytest.mark.usefixtures("lang_locale")
class TestLuxembourgishLocale:
    def test_ordinal_number(self):
        assert self.locale.ordinal_number(1) == "1."

    def test_define(self):
        assert self.locale.describe("minute", only_distance=True) == "eng Minutt"
        assert self.locale.describe("minute", only_distance=False) == "an enger Minutt"
        assert self.locale.describe("hour", only_distance=True) == "eng Stonn"
        assert self.locale.describe("hour", only_distance=False) == "an enger Stonn"
        assert self.locale.describe("day", only_distance=True) == "een Dag"
        assert self.locale.describe("day", only_distance=False) == "an engem Dag"
        assert self.locale.describe("week", only_distance=True) == "eng Woch"
        assert self.locale.describe("week", only_distance=False) == "an enger Woch"
        assert self.locale.describe("month", only_distance=True) == "ee Mount"
        assert self.locale.describe("month", only_distance=False) == "an engem Mount"
        assert self.locale.describe("year", only_distance=True) == "ee Joer"
        assert self.locale.describe("year", only_distance=False) == "an engem Joer"

    def test_weekday(self):
        dt = arrow.Arrow(2015, 4, 11, 17, 30, 00)
        assert self.locale.day_name(dt.isoweekday()) == "Samschdeg"
        assert self.locale.day_abbreviation(dt.isoweekday()) == "Sam"


@pytest.mark.usefixtures("lang_locale")
class TestTamilLocale:
    def test_format_timeframe(self):
        assert self.locale._format_timeframe("now", 0) == "இப்போது"
        assert self.locale._format_timeframe("second", 1) == "ஒரு இரண்டாவது"
        assert self.locale._format_timeframe("seconds", 3) == "3 விநாடிகள்"
        assert self.locale._format_timeframe("minute", 1) == "ஒரு நிமிடம்"
        assert self.locale._format_timeframe("minutes", 4) == "4 நிமிடங்கள்"
        assert self.locale._format_timeframe("hour", 1) == "ஒரு மணி"
        assert self.locale._format_timeframe("hours", 23) == "23 மணிநேரம்"
        assert self.locale._format_timeframe("day", 1) == "ஒரு நாள்"
        assert self.locale._format_timeframe("days", 12) == "12 நாட்கள்"
        assert self.locale._format_timeframe("week", 1) == "ஒரு வாரம்"
        assert self.locale._format_timeframe("weeks", 12) == "12 வாரங்கள்"
        assert self.locale._format_timeframe("month", 1) == "ஒரு மாதம்"
        assert self.locale._format_timeframe("months", 2) == "2 மாதங்கள்"
        assert self.locale._format_timeframe("year", 1) == "ஒரு ஆண்டு"
        assert self.locale._format_timeframe("years", 2) == "2 ஆண்டுகள்"

    def test_ordinal_number(self):
        assert self.locale._ordinal_number(0) == "0ஆம்"
        assert self.locale._ordinal_number(1) == "1வது"
        assert self.locale._ordinal_number(3) == "3ஆம்"
        assert self.locale._ordinal_number(11) == "11ஆம்"
        assert self.locale._ordinal_number(-1) == ""

    def test_format_relative_now(self):
        result = self.locale._format_relative("இப்போது", "now", 0)
        assert result == "இப்போது"

    def test_format_relative_past(self):
        result = self.locale._format_relative("ஒரு மணி", "hour", 1)
        assert result == "இல் ஒரு மணி"

    def test_format_relative_future(self):
        result = self.locale._format_relative("ஒரு மணி", "hour", -1)
        assert result == "ஒரு மணி நேரத்திற்கு முன்பு"

    def test_weekday(self):
        dt = arrow.Arrow(2015, 4, 11, 17, 30, 00)
        assert self.locale.day_name(dt.isoweekday()) == "சனிக்கிழமை"
        assert self.locale.day_abbreviation(dt.isoweekday()) == "சனி"


@pytest.mark.usefixtures("lang_locale")
class TestSinhalaLocale:
    def test_format_timeframe(self):
        # Now
        assert self.locale._format_timeframe("now", 0) == "දැන්"

        # Second(s)
        assert self.locale._format_timeframe("second", -1) == "තත්පරයක"
        assert self.locale._format_timeframe("second", 1) == "තත්පරයකින්"
        assert self.locale._format_timeframe("seconds", -30) == "තත්පර 30 ක"
        assert self.locale._format_timeframe("seconds", 30) == "තත්පර 30 කින්"

        # Minute(s)
        assert self.locale._format_timeframe("minute", -1) == "විනාඩියක"
        assert self.locale._format_timeframe("minute", 1) == "විනාඩියකින්"
        assert self.locale._format_timeframe("minutes", -4) == "විනාඩි 4 ක"
        assert self.locale._format_timeframe("minutes", 4) == "මිනිත්තු 4 කින්"

        # Hour(s)
        assert self.locale._format_timeframe("hour", -1) == "පැයක"
        assert self.locale._format_timeframe("hour", 1) == "පැයකින්"
        assert self.locale._format_timeframe("hours", -23) == "පැය 23 ක"
        assert self.locale._format_timeframe("hours", 23) == "පැය 23 කින්"

        # Day(s)
        assert self.locale._format_timeframe("day", -1) == "දිනක"
        assert self.locale._format_timeframe("day", 1) == "දිනකට"
        assert self.locale._format_timeframe("days", -12) == "දින 12 ක"
        assert self.locale._format_timeframe("days", 12) == "දින 12 කින්"

        # Week(s)
        assert self.locale._format_timeframe("week", -1) == "සතියක"
        assert self.locale._format_timeframe("week", 1) == "සතියකින්"
        assert self.locale._format_timeframe("weeks", -10) == "සති 10 ක"
        assert self.locale._format_timeframe("weeks", 10) == "සති 10 කින්"

        # Month(s)
        assert self.locale._format_timeframe("month", -1) == "මාසයක"
        assert self.locale._format_timeframe("month", 1) == "එය මාසය තුළ"
        assert self.locale._format_timeframe("months", -2) == "මාස 2 ක"
        assert self.locale._format_timeframe("months", 2) == "මාස 2 කින්"

        # Year(s)
        assert self.locale._format_timeframe("year", -1) == "වසරක"
        assert self.locale._format_timeframe("year", 1) == "වසරක් තුළ"
        assert self.locale._format_timeframe("years", -21) == "අවුරුදු 21 ක"
        assert self.locale._format_timeframe("years", 21) == "අවුරුදු 21 තුළ"

    def test_describe_si(self):
        assert self.locale.describe("second", only_distance=True) == "තත්පරයක්"
        assert (
            self.locale.describe("second", only_distance=False) == "තත්පරයකින්"
        )  # (in) a second

        assert self.locale.describe("minute", only_distance=True) == "මිනිත්තුවක්"
        assert (
            self.locale.describe("minute", only_distance=False) == "විනාඩියකින්"
        )  # (in) a minute

        assert self.locale.describe("hour", only_distance=True) == "පැයක්"
        assert self.locale.describe("hour", only_distance=False) == "පැයකින්"

        assert self.locale.describe("day", only_distance=True) == "දවසක්"
        assert self.locale.describe("day", only_distance=False) == "දිනකට"

        assert self.locale.describe("week", only_distance=True) == "සතියක්"
        assert self.locale.describe("week", only_distance=False) == "සතියකින්"

        assert self.locale.describe("month", only_distance=True) == "මාසයක්"
        assert self.locale.describe("month", only_distance=False) == "එය මාසය තුළ"

        assert self.locale.describe("year", only_distance=True) == "අවුරුද්දක්"
        assert self.locale.describe("year", only_distance=False) == "වසරක් තුළ"

    def test_format_relative_now(self):
        result = self.locale._format_relative("දැන්", "now", 0)
        assert result == "දැන්"

    def test_format_relative_future(self):
        result = self.locale._format_relative("පැයකින්", "පැය", 1)

        assert result == "පැයකින්"  # (in) one hour

    def test_format_relative_past(self):
        result = self.locale._format_relative("පැයක", "පැය", -1)

        assert result == "පැයකට පෙර"  # an hour ago

    def test_weekday(self):
        dt = arrow.Arrow(2015, 4, 11, 17, 30, 00)
        assert self.locale.day_name(dt.isoweekday()) == "සෙනසුරාදා"
        assert self.locale.day_abbreviation(dt.isoweekday()) == "අ"


@pytest.mark.usefixtures("lang_locale")
class TestKazakhLocale:
    def test_singles_mk(self):
        assert self.locale._format_timeframe("second", 1) == "бір секунд"
        assert self.locale._format_timeframe("minute", 1) == "бір минут"
        assert self.locale._format_timeframe("hour", 1) == "бір сағат"
        assert self.locale._format_timeframe("day", 1) == "бір күн"
        assert self.locale._format_timeframe("week", 1) == "бір апта"
        assert self.locale._format_timeframe("month", 1) == "бір ай"
        assert self.locale._format_timeframe("year", 1) == "бір жыл"

    def test_describe_mk(self):
        assert self.locale.describe("second", only_distance=True) == "бір секунд"
        assert self.locale.describe("second", only_distance=False) == "бір секунд кейін"
        assert self.locale.describe("minute", only_distance=True) == "бір минут"
        assert self.locale.describe("minute", only_distance=False) == "бір минут кейін"
        assert self.locale.describe("hour", only_distance=True) == "бір сағат"
        assert self.locale.describe("hour", only_distance=False) == "бір сағат кейін"
        assert self.locale.describe("day", only_distance=True) == "бір күн"
        assert self.locale.describe("day", only_distance=False) == "бір күн кейін"
        assert self.locale.describe("week", only_distance=True) == "бір апта"
        assert self.locale.describe("week", only_distance=False) == "бір апта кейін"
        assert self.locale.describe("month", only_distance=True) == "бір ай"
        assert self.locale.describe("month", only_distance=False) == "бір ай кейін"
        assert self.locale.describe("year", only_distance=True) == "бір жыл"
        assert self.locale.describe("year", only_distance=False) == "бір жыл кейін"

    def test_relative_mk(self):
        assert self.locale._format_relative("қазір", "now", 0) == "қазір"
        assert (
            self.locale._format_relative("1 секунд", "seconds", 1) == "1 секунд кейін"
        )
        assert (
            self.locale._format_relative("1 секунд", "seconds", -1) == "1 секунд бұрын"
        )
        assert self.locale._format_relative("1 минут", "minutes", 1) == "1 минут кейін"
        assert self.locale._format_relative("1 минут", "minutes", -1) == "1 минут бұрын"
        assert self.locale._format_relative("1 сағат", "hours", 1) == "1 сағат кейін"
        assert self.locale._format_relative("1 сағат", "hours", -1) == "1 сағат бұрын"
        assert self.locale._format_relative("1 күн", "days", 1) == "1 күн кейін"
        assert self.locale._format_relative("1 күн", "days", -1) == "1 күн бұрын"
        assert self.locale._format_relative("1 апта", "weeks", 1) == "1 апта кейін"
        assert self.locale._format_relative("1 апта", "weeks", -1) == "1 апта бұрын"
        assert self.locale._format_relative("1 ай", "months", 1) == "1 ай кейін"
        assert self.locale._format_relative("1 ай", "months", -1) == "1 ай бұрын"
        assert self.locale._format_relative("1 жыл", "years", 1) == "1 жыл кейін"
        assert self.locale._format_relative("1 жыл", "years", -1) == "1 жыл бұрын"

    def test_plurals_mk(self):
        assert self.locale._format_timeframe("now", 0) == "қазір"
        assert self.locale._format_timeframe("second", 1) == "бір секунд"
        assert self.locale._format_timeframe("seconds", 30) == "30 секунд"
        assert self.locale._format_timeframe("minute", 1) == "бір минут"
        assert self.locale._format_timeframe("minutes", 40) == "40 минут"
        assert self.locale._format_timeframe("hour", 1) == "бір сағат"
        assert self.locale._format_timeframe("hours", 23) == "23 сағат"
        assert self.locale._format_timeframe("days", 12) == "12 күн"
        assert self.locale._format_timeframe("week", 1) == "бір апта"
        assert self.locale._format_timeframe("weeks", 38) == "38 апта"
        assert self.locale._format_timeframe("month", 1) == "бір ай"
        assert self.locale._format_timeframe("months", 11) == "11 ай"
        assert self.locale._format_timeframe("year", 1) == "бір жыл"
        assert self.locale._format_timeframe("years", 12) == "12 жыл"


@pytest.mark.usefixtures("lang_locale")
class TestNorwegianLocale:
    def test_describe(self):
        assert self.locale.describe("now", only_distance=True) == "nå nettopp"
        assert self.locale.describe("now", only_distance=False) == "nå nettopp"

    def test_plurals(self):
        assert self.locale._format_timeframe("now", 0) == "nå nettopp"
        assert self.locale._format_timeframe("second", 1) == "ett sekund"
        assert self.locale._format_timeframe("seconds", 30) == "30 sekunder"
        assert self.locale._format_timeframe("minute", 1) == "ett minutt"
        assert self.locale._format_timeframe("minutes", 40) == "40 minutter"
        assert self.locale._format_timeframe("hour", 1) == "en time"
        assert self.locale._format_timeframe("hours", 23) == "23 timer"
        assert self.locale._format_timeframe("day", 1) == "en dag"
        assert self.locale._format_timeframe("days", 12) == "12 dager"
        assert self.locale._format_timeframe("week", 1) == "en uke"
        assert self.locale._format_timeframe("weeks", 38) == "38 uker"
        assert self.locale._format_timeframe("month", 1) == "en måned"
        assert self.locale._format_timeframe("months", 11) == "11 måneder"
        assert self.locale._format_timeframe("year", 1) == "ett år"
        assert self.locale._format_timeframe("years", 12) == "12 år"

    def test_ordinal_number(self):
        assert self.locale.ordinal_number(0) == "0."
        assert self.locale.ordinal_number(1) == "1."

    def test_format_timeframe(self):
        assert self.locale._format_timeframe("hours", 2) == "2 timer"
        assert self.locale._format_timeframe("hour", 0) == "en time"

    def test_format_relative_now(self):
        result = self.locale._format_relative("nå nettopp", "now", 0)

        assert result == "nå nettopp"

    def test_format_relative_past(self):
        result = self.locale._format_relative("en time", "hour", 1)

        assert result == "om en time"

    def test_format_relative_future(self):
        result = self.locale._format_relative("en time", "hour", -1)

        assert result == "for en time siden"

    def test_weekday(self):
        dt = arrow.Arrow(2015, 4, 11, 17, 30, 00)
        assert self.locale.day_name(dt.isoweekday()) == "lørdag"
        assert self.locale.day_abbreviation(dt.isoweekday()) == "lø"


@pytest.mark.usefixtures("lang_locale")
class TestNewNorwegianLocale:
    def test_describe(self):
        assert self.locale.describe("now", only_distance=True) == "no nettopp"
        assert self.locale.describe("now", only_distance=False) == "no nettopp"

    def test_plurals(self):
        assert self.locale._format_timeframe("now", 0) == "no nettopp"
        assert self.locale._format_timeframe("second", 1) == "eitt sekund"
        assert self.locale._format_timeframe("seconds", 30) == "30 sekund"
        assert self.locale._format_timeframe("minute", 1) == "eitt minutt"
        assert self.locale._format_timeframe("minutes", 40) == "40 minutt"
        assert self.locale._format_timeframe("hour", 1) == "ein time"
        assert self.locale._format_timeframe("hours", 23) == "23 timar"
        assert self.locale._format_timeframe("day", 1) == "ein dag"
        assert self.locale._format_timeframe("days", 12) == "12 dagar"
        assert self.locale._format_timeframe("week", 1) == "ei veke"
        assert self.locale._format_timeframe("weeks", 38) == "38 veker"
        assert self.locale._format_timeframe("month", 1) == "ein månad"
        assert self.locale._format_timeframe("months", 11) == "11 månader"
        assert self.locale._format_timeframe("year", 1) == "eitt år"
        assert self.locale._format_timeframe("years", 12) == "12 år"

    def test_ordinal_number(self):
        assert self.locale.ordinal_number(0) == "0."
        assert self.locale.ordinal_number(1) == "1."

    def test_format_timeframe(self):
        assert self.locale._format_timeframe("hours", 2) == "2 timar"
        assert self.locale._format_timeframe("hour", 0) == "ein time"

    def test_format_relative_now(self):
        result = self.locale._format_relative("no nettopp", "now", 0)

        assert result == "no nettopp"

    def test_format_relative_past(self):
        result = self.locale._format_relative("ein time", "hour", 1)

        assert result == "om ein time"

    def test_format_relative_future(self):
        result = self.locale._format_relative("ein time", "hour", -1)

        assert result == "for ein time sidan"

    def test_weekday(self):
        dt = arrow.Arrow(2015, 4, 11, 17, 30, 00)
        assert self.locale.day_name(dt.isoweekday()) == "laurdag"
        assert self.locale.day_abbreviation(dt.isoweekday()) == "la"


@pytest.mark.usefixtures("lang_locale")
class TestDanishLocale:
    def test_describe(self):
        assert self.locale.describe("now", only_distance=True) == "lige nu"
        assert self.locale.describe("now", only_distance=False) == "lige nu"

    def test_plurals(self):
        assert self.locale._format_timeframe("now", 0) == "lige nu"
        assert self.locale._format_timeframe("second", 1) == "et sekund"
        assert self.locale._format_timeframe("seconds", 30) == "30 sekunder"
        assert self.locale._format_timeframe("minute", 1) == "et minut"
        assert self.locale._format_timeframe("minutes", 40) == "40 minutter"
        assert self.locale._format_timeframe("hour", 1) == "en time"
        assert self.locale._format_timeframe("hours", 23) == "23 timer"
        assert self.locale._format_timeframe("day", 1) == "en dag"
        assert self.locale._format_timeframe("days", 12) == "12 dage"
        assert self.locale._format_timeframe("week", 1) == "en uge"
        assert self.locale._format_timeframe("weeks", 38) == "38 uger"
        assert self.locale._format_timeframe("month", 1) == "en måned"
        assert self.locale._format_timeframe("months", 11) == "11 måneder"
        assert self.locale._format_timeframe("year", 1) == "et år"
        assert self.locale._format_timeframe("years", 12) == "12 år"

    def test_ordinal_number(self):
        assert self.locale.ordinal_number(0) == "0."
        assert self.locale.ordinal_number(1) == "1."

    def test_format_timeframe(self):
        assert self.locale._format_timeframe("hours", 2) == "2 timer"
        assert self.locale._format_timeframe("hour", 0) == "en time"

    def test_format_relative_now(self):
        result = self.locale._format_relative("lige nu", "now", 0)

        assert result == "lige nu"

    def test_format_relative_past(self):
        result = self.locale._format_relative("en time", "hour", 1)

        assert result == "om en time"

    def test_format_relative_future(self):
        result = self.locale._format_relative("en time", "hour", -1)

        assert result == "for en time siden"

    def test_weekday(self):
        dt = arrow.Arrow(2015, 4, 11, 17, 30, 00)
        assert self.locale.day_name(dt.isoweekday()) == "lørdag"
        assert self.locale.day_abbreviation(dt.isoweekday()) == "lør"


@pytest.mark.usefixtures("lang_locale")
class TestAmharicLocale:
    def test_format_timeframe(self):
        assert self.locale._format_timeframe("now", 0) == "አሁን"
        # second(s)
        assert self.locale._format_timeframe("second", 1) == "በአንድ ሰከንድ"
        assert self.locale._format_timeframe("second", -1) == "ከአንድ ሰከንድ"
        assert self.locale._format_timeframe("seconds", 6) == "በ 6 ሰከንድ"
        assert self.locale._format_timeframe("seconds", -36) == "ከ 36 ሰከንድ"
        # minute(s)
        assert self.locale._format_timeframe("minute", 1) == "በአንድ ደቂቃ"
        assert self.locale._format_timeframe("minute", -1) == "ከአንድ ደቂቃ"
        assert self.locale._format_timeframe("minutes", 7) == "በ 7 ደቂቃዎች"
        assert self.locale._format_timeframe("minutes", -20) == "ከ 20 ደቂቃዎች"
        # hour(s)
        assert self.locale._format_timeframe("hour", 1) == "በአንድ ሰዓት"
        assert self.locale._format_timeframe("hour", -1) == "ከአንድ ሰዓት"
        assert self.locale._format_timeframe("hours", 7) == "በ 7 ሰከንድ"
        assert self.locale._format_timeframe("hours", -20) == "ከ 20 ሰዓታት"
        # day(s)
        assert self.locale._format_timeframe("day", 1) == "በአንድ ቀን"
        assert self.locale._format_timeframe("day", -1) == "ከአንድ ቀን"
        assert self.locale._format_timeframe("days", 7) == "በ 7 ቀናት"
        assert self.locale._format_timeframe("days", -20) == "ከ 20 ቀናት"
        # week(s)
        assert self.locale._format_timeframe("week", 1) == "በአንድ ሳምንት"
        assert self.locale._format_timeframe("week", -1) == "ከአንድ ሳምንት"
        assert self.locale._format_timeframe("weeks", 7) == "በ 7 ሳምንታት"
        assert self.locale._format_timeframe("weeks", -20) == "ከ 20 ሳምንታት"
        # month(s)
        assert self.locale._format_timeframe("month", 1) == "በአንድ ወር"
        assert self.locale._format_timeframe("month", -1) == "ከአንድ ወር"
        assert self.locale._format_timeframe("months", 7) == "በ 7 ወራት"
        assert self.locale._format_timeframe("months", -20) == "ከ 20 ወር"
        # year(s)
        assert self.locale._format_timeframe("year", 1) == "በአንድ አመት"
        assert self.locale._format_timeframe("year", -1) == "ከአንድ አመት"
        assert self.locale._format_timeframe("years", 7) == "በ 7 ዓመታት"
        assert self.locale._format_timeframe("years", -20) == "ከ 20 ዓመታት"

    def test_describe_am(self):
        assert self.locale.describe("second", only_distance=True) == "አንድ ሰከንድ"
        assert (
            self.locale.describe("second", only_distance=False) == "በአንድ ሰከንድ ውስጥ"
        )  # (in) a second

        assert self.locale.describe("minute", only_distance=True) == "አንድ ደቂቃ"
        assert (
            self.locale.describe("minute", only_distance=False) == "በአንድ ደቂቃ ውስጥ"
        )  # (in) a minute

    def test_format_relative_now(self):
        result = self.locale._format_relative("አሁን", "now", 0)
        assert result == "አሁን"

    def test_ordinal_number(self):
        assert self.locale.ordinal_number(1) == "1ኛ"

    def test_format_relative_future(self):
        result = self.locale._format_relative("በአንድ ሰዓት", "hour", 1)

        assert result == "በአንድ ሰዓት ውስጥ"  # (in) one hour

    def test_format_relative_past(self):
        result = self.locale._format_relative("ከአንድ ሰዓት", "hour", -1)

        assert result == "ከአንድ ሰዓት በፊት"  # an hour ago

    def test_weekday(self):
        dt = arrow.Arrow(2015, 4, 11, 17, 30, 00)
        assert self.locale.day_name(dt.isoweekday()) == "ቅዳሜ"
        assert self.locale.day_abbreviation(dt.isoweekday()) == "ዓ"


@pytest.mark.usefixtures("lang_locale")
class TestArmenianLocale:
    def test_describe(self):
        assert self.locale.describe("now", only_distance=True) == "հիմա"
        assert self.locale.describe("now", only_distance=False) == "հիմա"

    def test_meridians_hy(self):
        assert self.locale.meridian(7, "A") == "Ամ"
        assert self.locale.meridian(18, "A") == "պ.մ."
        assert self.locale.meridian(10, "a") == "Ամ"
        assert self.locale.meridian(22, "a") == "պ.մ."

    def test_format_timeframe(self):
        # Second(s)
        assert self.locale._format_timeframe("second", -1) == "վայրկյան"
        assert self.locale._format_timeframe("second", 1) == "վայրկյան"
        assert self.locale._format_timeframe("seconds", -3) == "3 վայրկյան"
        assert self.locale._format_timeframe("seconds", 3) == "3 վայրկյան"
        assert self.locale._format_timeframe("seconds", 30) == "30 վայրկյան"

        # Minute(s)
        assert self.locale._format_timeframe("minute", -1) == "րոպե"
        assert self.locale._format_timeframe("minute", 1) == "րոպե"
        assert self.locale._format_timeframe("minutes", -4) == "4 րոպե"
        assert self.locale._format_timeframe("minutes", 4) == "4 րոպե"
        assert self.locale._format_timeframe("minutes", 40) == "40 րոպե"

        # Hour(s)
        assert self.locale._format_timeframe("hour", -1) == "ժամ"
        assert self.locale._format_timeframe("hour", 1) == "ժամ"
        assert self.locale._format_timeframe("hours", -23) == "23 ժամ"
        assert self.locale._format_timeframe("hours", 23) == "23 ժամ"

        # Day(s)
        assert self.locale._format_timeframe("day", -1) == "օր"
        assert self.locale._format_timeframe("day", 1) == "օր"
        assert self.locale._format_timeframe("days", -12) == "12 օր"
        assert self.locale._format_timeframe("days", 12) == "12 օր"

        # Month(s)
        assert self.locale._format_timeframe("month", -1) == "ամիս"
        assert self.locale._format_timeframe("month", 1) == "ամիս"
        assert self.locale._format_timeframe("months", -2) == "2 ամիս"
        assert self.locale._format_timeframe("months", 2) == "2 ամիս"
        assert self.locale._format_timeframe("months", 11) == "11 ամիս"

        # Year(s)
        assert self.locale._format_timeframe("year", -1) == "տարին"
        assert self.locale._format_timeframe("year", 1) == "տարին"
        assert self.locale._format_timeframe("years", -2) == "2 տարին"
        assert self.locale._format_timeframe("years", 2) == "2 տարին"
        assert self.locale._format_timeframe("years", 12) == "12 տարին"

    def test_weekday(self):
        dt = arrow.Arrow(2015, 4, 11, 17, 30, 00)
        assert self.locale.day_name(dt.isoweekday()) == "շաբաթ"
        assert self.locale.day_abbreviation(dt.isoweekday()) == "շաբ."


@pytest.mark.usefixtures("lang_locale")
class TestUzbekLocale:
    def test_singles_mk(self):
        assert self.locale._format_timeframe("second", 1) == "bir soniya"
        assert self.locale._format_timeframe("minute", 1) == "bir daqiqa"
        assert self.locale._format_timeframe("hour", 1) == "bir soat"
        assert self.locale._format_timeframe("day", 1) == "bir kun"
        assert self.locale._format_timeframe("week", 1) == "bir hafta"
        assert self.locale._format_timeframe("month", 1) == "bir oy"
        assert self.locale._format_timeframe("year", 1) == "bir yil"

    def test_describe_mk(self):
        assert self.locale.describe("second", only_distance=True) == "bir soniya"
        assert (
            self.locale.describe("second", only_distance=False) == "bir soniyadan keyin"
        )
        assert self.locale.describe("minute", only_distance=True) == "bir daqiqa"
        assert (
            self.locale.describe("minute", only_distance=False) == "bir daqiqadan keyin"
        )
        assert self.locale.describe("hour", only_distance=True) == "bir soat"
        assert self.locale.describe("hour", only_distance=False) == "bir soatdan keyin"
        assert self.locale.describe("day", only_distance=True) == "bir kun"
        assert self.locale.describe("day", only_distance=False) == "bir kundan keyin"
        assert self.locale.describe("week", only_distance=True) == "bir hafta"
        assert self.locale.describe("week", only_distance=False) == "bir haftadan keyin"
        assert self.locale.describe("month", only_distance=True) == "bir oy"
        assert self.locale.describe("month", only_distance=False) == "bir oydan keyin"
        assert self.locale.describe("year", only_distance=True) == "bir yil"
        assert self.locale.describe("year", only_distance=False) == "bir yildan keyin"

    def test_relative_mk(self):
        assert self.locale._format_relative("hozir", "now", 0) == "hozir"
        assert (
            self.locale._format_relative("1 soniya", "seconds", 1)
            == "1 soniyadan keyin"
        )
        assert (
            self.locale._format_relative("1 soniya", "seconds", -1)
            == "1 soniyadan avval"
        )
        assert (
            self.locale._format_relative("1 daqiqa", "minutes", 1)
            == "1 daqiqadan keyin"
        )
        assert (
            self.locale._format_relative("1 daqiqa", "minutes", -1)
            == "1 daqiqadan avval"
        )
        assert self.locale._format_relative("1 soat", "hours", 1) == "1 soatdan keyin"
        assert self.locale._format_relative("1 soat", "hours", -1) == "1 soatdan avval"
        assert self.locale._format_relative("1 kun", "days", 1) == "1 kundan keyin"
        assert self.locale._format_relative("1 kun", "days", -1) == "1 kundan avval"
        assert self.locale._format_relative("1 hafta", "weeks", 1) == "1 haftadan keyin"
        assert (
            self.locale._format_relative("1 hafta", "weeks", -1) == "1 haftadan avval"
        )
        assert self.locale._format_relative("1 oy", "months", 1) == "1 oydan keyin"
        assert self.locale._format_relative("1 oy", "months", -1) == "1 oydan avval"
        assert self.locale._format_relative("1 yil", "years", 1) == "1 yildan keyin"
        assert self.locale._format_relative("1 yil", "years", -1) == "1 yildan avval"

    def test_plurals_mk(self):
        assert self.locale._format_timeframe("now", 0) == "hozir"
        assert self.locale._format_timeframe("second", 1) == "bir soniya"
        assert self.locale._format_timeframe("seconds", 30) == "30 soniya"
        assert self.locale._format_timeframe("minute", 1) == "bir daqiqa"
        assert self.locale._format_timeframe("minutes", 40) == "40 daqiqa"
        assert self.locale._format_timeframe("hour", 1) == "bir soat"
        assert self.locale._format_timeframe("hours", 23) == "23 soat"
        assert self.locale._format_timeframe("days", 12) == "12 kun"
        assert self.locale._format_timeframe("week", 1) == "bir hafta"
        assert self.locale._format_timeframe("weeks", 38) == "38 hafta"
        assert self.locale._format_timeframe("month", 1) == "bir oy"
        assert self.locale._format_timeframe("months", 11) == "11 oy"
        assert self.locale._format_timeframe("year", 1) == "bir yil"
        assert self.locale._format_timeframe("years", 12) == "12 yil"