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

rero / rero-ils / 29720490614
91%

Build:
DEFAULT BRANCH: staging
Ran 20 Jul 2026 06:51AM UTC
Jobs 1
Files 612
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

20 Jul 2026 06:01AM UTC coverage: 91.303% (-0.01%) from 91.317%
29720490614

push

github

rerowep
fix(acquisition): round monetary float arithmetic to 2 decimal places

Float multiplication such as 1.1 * 3 = 3.3000000000000003 in Python
caused the rollover to fail with a ValidationError when the computed
total_amount exceeded the account's allocated_amount by a rounding
artefact.

* round(amount * quantity, 2) in AcqOrderLine._build_total_amount
* round(amount * quantity - discount, 2) in _check_balance extension
* round(unreceived_quantity * amount, 2) in order line listener
* round(self_amount + children_amount, 2) for encumbrance and
  expenditure totals in account listener
* round(allocated_amount * rate / 100, 2) in AcqAccount.get_exceedance
* add test_build_total_amount verifying 0.1 * 3 rounds to 0.30
* add test_get_exceedance verifying 7% of 1000.10 rounds to 70.01
* add test_rollover_float_precision reproducing the exact rollover
  failure: account allocated_amount=3.3, order line amount=1.1 qty=3
* Closes #3998

Co-Authored-by: Peter Weber <peter.weber@rero.ch>

4 of 4 new or added lines in 4 files covered. (100.0%)

24 existing lines in 1 file now uncovered.

24261 of 26572 relevant lines covered (91.3%)

0.91 hits per line

Coverage Regressions

Lines Coverage ∆ File
24
91.25
-1.79% rero_ils/modules/imports/api.py
Jobs
ID Job ID Ran Files Coverage
1 29720490614.1 20 Jul 2026 06:51AM UTC 612
91.3
GitHub Action Run
Source Files on build 29720490614
  • Tree
  • List 612
  • Changed 6
  • Source Changed 6
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #29720490614
  • fa7f9422 on github
  • Prev Build on staging (#29495734459)
  • Next Build on staging (#29730290587)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc