• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jqueguiner / num2words2 / 25217503490
95%
master: 94%

Build:
Build:
LAST BUILD BRANCH: feat/sentence-multilang-ordinals
DEFAULT BRANCH: master
Ran 01 May 2026 02:12PM UTC
Jobs 6
Files 334
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

01 May 2026 02:11PM UTC coverage: 95.27% (-0.01%) from 95.281%
25217503490

push

github

web-flow
feat(currency): 3-decimal mils + bank cheque format (#112)

Two upstream feature requests, shipped together because they share the
same per-currency precision plumbing:

#256 — 3-decimal currencies (savoirfairelinux/num2words#256)
  Currencies with 1000-mil subunits (BHD, KWD, OMR, JOD, TND, LYD, IQD)
  now round-trip cleanly through to_currency. Driven by:
    - parse_currency_parts gains a `divisor` parameter (defaults 100)
    - Num2Word_Base.CURRENCY_PRECISION class map; per-currency override
    - to_currency reads the divisor and quantizes accordingly
    - Zero-decimal currencies (JPY/KRW are kept at default 100 to
      preserve historical sen/jeon test fixtures; the divisor=1 path
      exists for callers who want round-to-whole-unit explicitly)

  Examples:
    num2words(5.123, currency='BHD')  # 'five dinars, one hundred and twenty-three fils'
    num2words(0.001, currency='TND')  # 'zero dinars, one millime'

#364 — bank cheque format (savoirfairelinux/num2words#364)
  New `to='cheque'` mode emits the standard banking style:
    "ONE THOUSAND, TWO HUNDRED AND THIRTY-FOUR AND 56/100 DOLLARS"
  Combines:
    - integer part as cardinal words
    - " AND " connector
    - fractional subunit as digits/divisor (e.g. 56/100, 234/1000)
    - currency name in plural (cheque convention always pluralises)
    - whole result upper-cased

  Composes cleanly with #256: a BHD cheque ends "234/1000 DINARS".

Tests live in tests/test_currency_3decimal_and_cheque.py covering all
seven mil currencies, integer / float / negative inputs, plural-form
edge cases, and the unknown-currency raise.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

7946 of 8706 branches covered (91.27%)

Branch coverage included in aggregate %.

101 of 107 new or added lines in 5 files covered. (94.39%)

41962 of 43680 relevant lines covered (96.07%)

5.76 hits per line

Uncovered Changes

Lines Coverage ∆ File
5
91.69
-1.77% num2words2/base.py
1
96.67
tests/test_currency_3decimal_and_cheque.py
Jobs
ID Job ID Ran Files Coverage
1 3.13 - 25217503490.1 01 May 2026 02:13PM UTC 334
95.27
GitHub Action Run
2 3.15 - 25217503490.2 01 May 2026 02:13PM UTC 334
95.27
GitHub Action Run
3 3.11 - 25217503490.3 01 May 2026 02:13PM UTC 334
95.27
GitHub Action Run
4 3.10 - 25217503490.4 01 May 2026 02:13PM UTC 334
95.27
GitHub Action Run
5 3.14 - 25217503490.5 01 May 2026 02:13PM UTC 334
95.27
GitHub Action Run
6 3.12 - 25217503490.6 01 May 2026 02:13PM UTC 334
95.27
GitHub Action Run
Source Files on build 25217503490
  • Tree
  • List 334
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 1373934b on github
  • Prev Build on main (#25215226920)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc