mjemmeson / Date-Holidays-GB

Other
4 stars 1 forks source link

t/next-holiday.t may fail (with older Test::Time?) #6

Closed eserte closed 4 years ago

eserte commented 4 years ago

On some of my smokers the test suite fails like this:

#   Failed test 'next holiday as expected'
#   at t/next-holiday.t line 35.
#     Structures begin differing at:
#          $got->{NIR}{date} = '2020-03-17'
#     $expected->{NIR}{date} = '2020-04-13'

    #   Failed test 'next holiday for one region as expected'
    #   at t/next-holiday.t line 58.
    #     Structures begin differing at:
    #          $got->{EAW}{name} = 'Good Friday'
    #     $expected->{EAW}{name} = 'Easter Monday'

    #   Failed test 'next holiday for multiple regions as expected'
    #   at t/next-holiday.t line 67.
Wide character in print at /home/cpansand/.cpan/build/2020021720/Test-Simple-1.302171-X6DIS0/blib/lib/Test2/Formatter/TAP.pm line 125, <DATA> line 273.
    #     Structures begin differing at:
    #          $got->{NIR}{name} = 'St Patrick’s Day'
    #     $expected->{NIR}{name} = 'Easter Monday'
    # Looks like you failed 2 tests of 2.

#   Failed test 'regions'
#   at t/next-holiday.t line 79.
# Looks like you failed 2 tests of 5.
t/next-holiday.t ....... 
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/5 subtests 

Statistical analysis suggests that the breakage happens if older versions of Test::Time are installed — 0.05 is problematic, 0.07 and 0.08 are OK:

****************************************************************
Regression 'mod:Test::Time'
****************************************************************
Name                   Theta          StdErr     T-stat
[0='const']          -0.0000          0.0000      -3.76
[1='eq_0.05']         0.0000          0.0000       0.95
[2='eq_0.07']         1.0000          0.0000    10014919703288618.00
[3='eq_0.08']         1.0000          0.0000    10855106625741016.00

R^2= 1.000, N= 101, K= 4
****************************************************************
mjemmeson commented 4 years ago

Thanks! Have specified a minimum version now and the testers are looking happier. (It was me who was responsible for the fix in Test::Time 0.06, so I should have remembered!)

Michael