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: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]

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.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to