Skip Menu |

This queue is for tickets about the DateTime-Format-Human-Duration CPAN distribution.

Report information
The Basics
Id: 108601
Status: resolved
Priority: 0/
Queue: DateTime-Format-Human-Duration

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.62
Fixed in: (no value)



Subject: Tests fail (with latest DateTime::Locale?)
If DateTime::Locale 1.01 is installed, then the test suite fails: # Failed test 'locale key as $DateTime obj format_duration()' # at t/01.methods.t line 63. # got: '1 minute and 3 seconds' # expected: '1 minute et 3 seconds' # Failed test 'locale key as $DateTime->{'locale'} format_duration()' # at t/01.methods.t line 64. # got: '1 minute and 3 seconds' # expected: '1 minute et 3 seconds' # Failed test 'Object's locale used in format_duration_between()' # at t/01.methods.t line 65. # got: '1 minute and 1 second' # expected: '1 minute et 1 seconde' # Looks like you failed 3 tests of 30. t/01.methods.t .. Dubious, test returned 3 (wstat 768, 0x300) Failed 3/30 subtests (1 TODO test unexpectedly succeeded) # Failed test at t/02.array.t line 19. # got: 'in 1 minute' # expected: '1mi ago' # Failed test at t/02.array.t line 20. # got: '1 minute ago' # expected: 'in 1mi' # Looks like you failed 2 tests of 2. t/02.array.t .... Dubious, test returned 2 (wstat 512, 0x200) Failed 2/2 subtests
I'm pretty sure this is because this module is poking into the hashref of both DateTime and DateTime::Locale! Don't do that. Use the documented APIs. They're documented for a reason.
On 2015-11-09 02:53:14, SREZIC wrote: Show quoted text
> If DateTime::Locale 1.01 is installed, then the test suite fails: > > # Failed test 'locale key as $DateTime obj format_duration()' > # at t/01.methods.t line 63. > # got: '1 minute and 3 seconds' > # expected: '1 minute et 3 seconds' > > # Failed test 'locale key as $DateTime->{'locale'} format_duration()' > # at t/01.methods.t line 64. > # got: '1 minute and 3 seconds' > # expected: '1 minute et 3 seconds' > > # Failed test 'Object's locale used in format_duration_between()' > # at t/01.methods.t line 65. > # got: '1 minute and 1 second' > # expected: '1 minute et 1 seconde' > # Looks like you failed 3 tests of 30. > t/01.methods.t .. > Dubious, test returned 3 (wstat 768, 0x300) > Failed 3/30 subtests > (1 TODO test unexpectedly succeeded) > > # Failed test at t/02.array.t line 19. > # got: 'in 1 minute' > # expected: '1mi ago' > > # Failed test at t/02.array.t line 20. > # got: '1 minute ago' > # expected: 'in 1mi' > # Looks like you failed 2 tests of 2. > t/02.array.t .... > Dubious, test returned 2 (wstat 512, 0x200) > Failed 2/2 subtests
https://github.com/mstratman/DateTime-Format-Human-Duration/pull/7
Just wanted to point out that this is still an issue. It looks like there's an open PR that may fix though? https://github.com/mstratman/DateTime-Format-Human-Duration/pull/7/files On Sat Dec 26 14:31:27 2015, SREZIC wrote: Show quoted text
> On 2015-11-09 02:53:14, SREZIC wrote:
> > If DateTime::Locale 1.01 is installed, then the test suite fails: > > > > # Failed test 'locale key as $DateTime obj format_duration()' > > # at t/01.methods.t line 63. > > # got: '1 minute and 3 seconds' > > # expected: '1 minute et 3 seconds' > > > > # Failed test 'locale key as $DateTime->{'locale'} format_duration()' > > # at t/01.methods.t line 64. > > # got: '1 minute and 3 seconds' > > # expected: '1 minute et 3 seconds' > > > > # Failed test 'Object's locale used in format_duration_between()' > > # at t/01.methods.t line 65. > > # got: '1 minute and 1 second' > > # expected: '1 minute et 1 seconde' > > # Looks like you failed 3 tests of 30. > > t/01.methods.t .. > > Dubious, test returned 3 (wstat 768, 0x300) > > Failed 3/30 subtests > > (1 TODO test unexpectedly succeeded) > > > > # Failed test at t/02.array.t line 19. > > # got: 'in 1 minute' > > # expected: '1mi ago' > > > > # Failed test at t/02.array.t line 20. > > # got: '1 minute ago' > > # expected: 'in 1mi' > > # Looks like you failed 2 tests of 2. > > t/02.array.t .... > > Dubious, test returned 2 (wstat 512, 0x200) > > Failed 2/2 subtests
> > https://github.com/mstratman/DateTime-Format-Human-Duration/pull/7
Fixed in 0.64. Thanks for the reminder. On Thu Jul 21 14:28:51 2016, MOOLLAZA wrote: Show quoted text
> Just wanted to point out that this is still an issue. It looks like > there's an open PR that may fix though? > > https://github.com/mstratman/DateTime-Format-Human- > Duration/pull/7/files > > On Sat Dec 26 14:31:27 2015, SREZIC wrote:
> > On 2015-11-09 02:53:14, SREZIC wrote:
> > > If DateTime::Locale 1.01 is installed, then the test suite fails: > > > > > > # Failed test 'locale key as $DateTime obj format_duration()' > > > # at t/01.methods.t line 63. > > > # got: '1 minute and 3 seconds' > > > # expected: '1 minute et 3 seconds' > > > > > > # Failed test 'locale key as $DateTime->{'locale'} > > > format_duration()' > > > # at t/01.methods.t line 64. > > > # got: '1 minute and 3 seconds' > > > # expected: '1 minute et 3 seconds' > > > > > > # Failed test 'Object's locale used in format_duration_between()' > > > # at t/01.methods.t line 65. > > > # got: '1 minute and 1 second' > > > # expected: '1 minute et 1 seconde' > > > # Looks like you failed 3 tests of 30. > > > t/01.methods.t .. > > > Dubious, test returned 3 (wstat 768, 0x300) > > > Failed 3/30 subtests > > > (1 TODO test unexpectedly succeeded) > > > > > > # Failed test at t/02.array.t line 19. > > > # got: 'in 1 minute' > > > # expected: '1mi ago' > > > > > > # Failed test at t/02.array.t line 20. > > > # got: '1 minute ago' > > > # expected: 'in 1mi' > > > # Looks like you failed 2 tests of 2. > > > t/02.array.t .... > > > Dubious, test returned 2 (wstat 512, 0x200) > > > Failed 2/2 subtests
> > > > https://github.com/mstratman/DateTime-Format-Human-Duration/pull/7