Closed sania-dsouza closed 2 years ago
Changes made:
Added corresponding tests borrowing from Turkish.
@sania-dsouza it seems like CI tests are failing:
2021-10-21T05:08:39.1850683Z =================================== FAILURES ===================================
2021-10-21T05:08:39.1851390Z ____________________ TestAzerbaijaniLocale.test_singles_mk _____________________
2021-10-21T05:08:39.1851874Z
2021-10-21T05:08:39.1852555Z self = <tests.test_locales.TestAzerbaijaniLocale object at 0x7f5a247c5cc0>
2021-10-21T05:08:39.1853145Z
2021-10-21T05:08:39.1853516Z def test_singles_mk(self):
2021-10-21T05:08:39.1855257Z assert self.locale._format_timeframe("second", 1) == "bir saniyə"
2021-10-21T05:08:39.1856058Z assert self.locale._format_timeframe("minute", 1) == "bir dəqiqə"
2021-10-21T05:08:39.1856705Z assert self.locale._format_timeframe("hour", 1) == "bir saat"
2021-10-21T05:08:39.1857460Z assert self.locale._format_timeframe("day", 1) == "bir gün"
2021-10-21T05:08:39.1858226Z assert self.locale._format_timeframe("week", 1) == "bir həftə"
2021-10-21T05:08:39.1858836Z assert self.locale._format_timeframe("month", 1) == "bir ay"
2021-10-21T05:08:39.1859431Z > assert self.locale._format_timeframe("year", 1) == "bir il"
2021-10-21T05:08:39.1860157Z E AssertionError: assert 'il' == 'bir il'
2021-10-21T05:08:39.1860667Z E - bir il
2021-10-21T05:08:39.1860952Z E + il
2021-10-21T05:08:39.1861409Z
2021-10-21T05:08:39.1861821Z tests/test_locales.py:780: AssertionError
2021-10-21T05:08:39.1862464Z ____________________ TestAzerbaijaniLocale.test_describe_mk ____________________
2021-10-21T05:08:39.1862897Z
2021-10-21T05:08:39.1863495Z self = <tests.test_locales.TestAzerbaijaniLocale object at 0x7f5a237817f0>
2021-10-21T05:08:39.1864007Z
2021-10-21T05:08:39.1864346Z def test_describe_mk(self):
2021-10-21T05:08:39.1865117Z assert self.locale.describe("second", only_distance=True) == "bir saniyə"
2021-10-21T05:08:39.1866069Z assert self.locale.describe("second", only_distance=False) == "bir saniyə sonra"
2021-10-21T05:08:39.1867015Z assert self.locale.describe("minute", only_distance=True) == "bir dəqiqə"
2021-10-21T05:08:39.1868066Z assert self.locale.describe("minute", only_distance=False) == "bir dəqiqə sonra"
2021-10-21T05:08:39.1868837Z assert self.locale.describe("hour", only_distance=True) == "bir saat"
2021-10-21T05:08:39.1869596Z assert self.locale.describe("hour", only_distance=False) == "bir saat sonra"
2021-10-21T05:08:39.1870506Z assert self.locale.describe("day", only_distance=True) == "bir gün"
2021-10-21T05:08:39.1871412Z assert self.locale.describe("day", only_distance=False) == "bir gün sonra"
2021-10-21T05:08:39.1879177Z assert self.locale.describe("week", only_distance=True) == "bir həftə"
2021-10-21T05:08:39.1880414Z assert self.locale.describe("week", only_distance=False) == "bir həftə sonra"
2021-10-21T05:08:39.1881180Z assert self.locale.describe("month", only_distance=True) == "bir ay"
2021-10-21T05:08:39.1881914Z assert self.locale.describe("month", only_distance=False) == "bir ay sonra"
2021-10-21T05:08:39.1882655Z > assert self.locale.describe("year", only_distance=True) == "bir il"
2021-10-21T05:08:39.1883449Z E AssertionError: assert 'il' == 'bir il'
2021-10-21T05:08:39.1883955Z E - bir il
2021-10-21T05:08:39.1884237Z E + il
2021-10-21T05:08:39.1884458Z
2021-10-21T05:08:39.1884864Z tests/test_locales.py:795: AssertionError
2021-10-21T05:08:39.1885523Z ____________________ TestAzerbaijaniLocale.test_plurals_mk _____________________
2021-10-21T05:08:39.1885941Z
2021-10-21T05:08:39.1886548Z self = <tests.test_locales.TestAzerbaijaniLocale object at 0x7f5a24398dd8>
2021-10-21T05:08:39.1887063Z
2021-10-21T05:08:39.1887400Z def test_plurals_mk(self):
2021-10-21T05:08:39.1887887Z assert self.locale._format_timeframe("now", 0) == "indi"
2021-10-21T05:08:39.1888671Z assert self.locale._format_timeframe("second", 1) == "bir saniyə"
2021-10-21T05:08:39.1889448Z assert self.locale._format_timeframe("seconds", 30) == "30 saniyə"
2021-10-21T05:08:39.1890218Z assert self.locale._format_timeframe("minute", 1) == "bir dəqiqə"
2021-10-21T05:08:39.1890979Z assert self.locale._format_timeframe("minutes", 40) == "40 dəqiqə"
2021-10-21T05:08:39.1891594Z assert self.locale._format_timeframe("hour", 1) == "bir saat"
2021-10-21T05:08:39.1892208Z assert self.locale._format_timeframe("hours", 23) == "23 saat"
2021-10-21T05:08:39.1892949Z assert self.locale._format_timeframe("day", 1) == "bir gün"
2021-10-21T05:08:39.1893831Z assert self.locale._format_timeframe("days", 12) == "12 gün"
2021-10-21T05:08:39.1894584Z assert self.locale._format_timeframe("week", 1) == "bir həftə"
2021-10-21T05:08:39.1895327Z assert self.locale._format_timeframe("weeks", 38) == "38 həftə"
2021-10-21T05:08:39.1895918Z assert self.locale._format_timeframe("month", 1) == "bir ay"
2021-10-21T05:08:39.1896519Z assert self.locale._format_timeframe("months", 11) == "11 ay"
2021-10-21T05:08:39.1897108Z > assert self.locale._format_timeframe("year", 1) == "bir il"
2021-10-21T05:08:39.1897797Z E AssertionError: assert 'il' == 'bir il'
2021-10-21T05:08:39.1898289Z E - bir il
2021-10-21T05:08:39.1898588Z E + il
2021-10-21T05:08:39.1898787Z
2021-10-21T05:08:39.1899426Z tests/test_locales.py:837: AssertionError
2021-10-21T05:08:39.1899733Z
2021-10-21T05:08:39.1900350Z ---------- coverage: platform linux, python 3.6.15-final-0 -----------
2021-10-21T05:08:39.1900936Z Name Stmts Miss Branch BrPart Cover Missing
2021-10-21T05:08:39.1901601Z ----------------------------------------------------------------
2021-10-21T05:08:39.1902047Z arrow/__init__.py 7 0 0 0 100%
2021-10-21T05:08:39.1902452Z arrow/_version.py 1 0 0 0 100%
2021-10-21T05:08:39.1902894Z arrow/api.py 30 0 0 0 100%
2021-10-21T05:08:39.1903275Z arrow/arrow.py 554 0 243 0 100%
2021-10-21T05:08:39.1903695Z arrow/constants.py 11 0 0 0 100%
2021-10-21T05:08:39.1904124Z arrow/factory.py 89 0 50 0 100%
2021-10-21T05:08:39.1904645Z arrow/formatter.py 102 0 72 0 100%
2021-10-21T05:08:39.1905073Z arrow/locales.py 1064 0 166 0 100%
2021-10-21T05:08:39.1905501Z arrow/parser.py 315 0 144 0 100%
2021-10-21T05:08:39.1905916Z arrow/util.py 45 0 22 0 100%
2021-10-21T05:08:39.1906512Z ----------------------------------------------------------------
2021-10-21T05:08:39.1906954Z TOTAL 2218 0 697 0 100%
2021-10-21T05:08:39.1907392Z Coverage XML written to file coverage.xml
2021-10-21T05:08:39.1907710Z
2021-10-21T05:08:39.1908129Z Required test coverage of 99% reached. Total coverage: 100.00%
2021-10-21T05:08:39.1908655Z =========================== short test summary info ============================
2021-10-21T05:08:39.1909695Z FAILED tests/test_locales.py::TestAzerbaijaniLocale::test_singles_mk - Assert...
2021-10-21T05:08:39.1910828Z FAILED tests/test_locales.py::TestAzerbaijaniLocale::test_describe_mk - Asser...
2021-10-21T05:08:39.1911929Z FAILED tests/test_locales.py::TestAzerbaijaniLocale::test_plurals_mk - Assert...
2021-10-21T05:08:39.1912610Z ================== 3 failed, 1758 passed, 2 xpassed in 11.52s ==================
hey @jadchaar , I pushed a change but the CI tests haven't kicked off for hours now.
hey @jadchaar , I pushed a change but the CI tests haven't kicked off for hours now.
It is due to a new restriction by GitHub that prevents new contributors to a repo from starting GitHub action runs. I just kicked it off for you :)
I think I am super nervous with all my typos today. I will need you to kick it off again please. :)
Merging #1052 (46fa675) into master (2ee879f) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #1052 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 10 10
Lines 2218 2218
Branches 348 348
=========================================
Hits 2218 2218
Impacted Files | Coverage Δ | |
---|---|---|
arrow/locales.py | 100.00% <ø> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 2ee879f...46fa675. Read the comment docs.
I think I am super nervous with all my typos today. I will need you to kick it off again please. :)
I just kicked it off. Also, no need to be nervous, even us maintainers make mistakes quite often. Thank you for the contribution and please feel free to ask questions or for help at any time!
Like Anish said, no need to be nervous we appreciate all contributions :)! Thanks for helping out @sania-dsouza! I just updated your branch with the latest master and will merge it in once CI passes!
Pull Request Checklist
Thank you for taking the time to improve Arrow! Before submitting your pull request, please check all appropriate boxes:
[x] 🧪 Added tests for changed code.
[x] 🛠️ All tests pass when run locally (run
tox
ormake test
to find out!).[x] 🧹 All linting checks pass when run locally (run
tox -e lint
ormake lint
to find out!).[x] 📚 Updated documentation for changed code.
[x] ⏩ Code is up-to-date with the
master
branch.If you have any questions about your code changes or any of the points above, please submit your questions along with the pull request and we will try our best to help!
Description of Changes