Project

General

Profile

Actions

Bug #439

closed

Bug 27630 - TestBuilder real number precision to use column's size

Added by Lari Taskula about 3 years ago. Updated about 3 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Target version:
-
Start date:
04.02.2021
Due date:
% Done:

100%

Estimated time:
Spent time:
Sponsored-by:
The National Library of Finland
Koha Bugzilla Bug#:

Description

t::lib::TestBuilder::_gen_real() always returns 2 decimal places no matter the column's size definition.

TestBuilder.pm _gen_real()
printf("%.2f", rand($max-0.1));

Our database has decimal type columns with higher than 2 decimal places. This makes comparing structures with Test::More::is_deeply impossible when the other object is built by TestBuilder, and the other fetched from database, as seen here:

  1. Structures begin differing at:
  2. $got->[0]{amount} = '90203.710000'
  3. $expected->[0]{amount} = '90203.71'

Related issues 1 (1 open0 closed)

Blocks Koha Contributions - Feature #421: Bug 20028 - Export all patron related personal data in one packageIn ProgressLari Taskula26.01.2021

Actions
Actions

Also available in: Atom PDF