[Koha-bugs] [Bug 27630] New: TestBuilder real number precision to use column's size
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Feb 4 20:27:32 CET 2021
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27630
Bug ID: 27630
Summary: TestBuilder real number precision to use column's size
Change sponsored?: ---
Product: Koha
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Test Suite
Assignee: chris at bigballofwax.co.nz
Reporter: lari.taskula at hypernova.fi
QA Contact: testopia at bugs.koha-community.org
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:
# Structures begin differing at:
# $got->[0]{amount} = '90203.710000'
# $expected->[0]{amount} = '90203.71'
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list