Bugzilla – Attachment 13679 Details for
Bug 9142
Failing test case in 3.10.0 release.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9142 - Remove the use of subtests
Bug-9142---Remove-the-use-of-subtests.patch (text/plain), 2.75 KB, created by
Tomás Cohen Arazi (tcohen)
on 2012-11-26 13:43:05 UTC
(
hide
)
Description:
Bug 9142 - Remove the use of subtests
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2012-11-26 13:43:05 UTC
Size:
2.75 KB
patch
obsolete
>From 20dbebbba2842ffe9b0f523691a1eb85d8bdc19f Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Mon, 26 Nov 2012 10:39:51 -0300 >Subject: [PATCH] Bug 9142 - Remove the use of subtests > >Debian stable's version of Test::More is older than the one I used on my >12.04 dev box, and doesn't support subtests, which I used to avoid side >effects between different test scenarios. > >This patch removes that subtest definition. >--- > t/Calendar.t | 26 +++++++++++++------------- > 1 file changed, 13 insertions(+), 13 deletions(-) > >diff --git a/t/Calendar.t b/t/Calendar.t >index d6972d0..07abbd4 100755 >--- a/t/Calendar.t >+++ b/t/Calendar.t >@@ -4,7 +4,7 @@ use strict; > use warnings; > use DateTime; > use DateTime::Duration; >-use Test::More tests => 22; >+use Test::More tests => 26; > use Koha::DateUtils; > > BEGIN { >@@ -127,9 +127,9 @@ my $one_day_dur = DateTime::Duration->new( days => 1 ); > my $two_day_dur = DateTime::Duration->new( days => 2 ); > my $seven_day_dur = DateTime::Duration->new( days => 7 ); > >-subtest '\'Datedue\' tests' => sub { >- my $cal = Koha::Calendar->new( TEST_MODE => 1 , >- days_mode => 'Datedue'); >+ ## 'Datedue' tests >+ $cal = Koha::Calendar->new( TEST_MODE => 1 , >+ days_mode => 'Datedue'); > > $cal->add_holiday( dt_from_string('2012-07-04','iso') ); > $dt = dt_from_string( '2012-07-03','iso' ); >@@ -145,12 +145,12 @@ subtest '\'Datedue\' tests' => sub { > cmp_ok($cal->addDate( $test_dt, $seven_day_dur, 'days' ), 'eq', > '2012-07-30T11:53:00', > 'Add 7 days (Datedue)' ); >-}; > > >-subtest '\'Calendar\' tests' => sub { >- my $cal = Koha::Calendar->new( TEST_MODE => 1, >- days_mode => 'Calendar' ); >+ >+ ## 'Calendar' tests' >+ $cal = Koha::Calendar->new( TEST_MODE => 1, >+ days_mode => 'Calendar' ); > > $cal->add_holiday( dt_from_string('2012-07-04','iso') ); > $dt = dt_from_string('2012-07-03','iso'); >@@ -162,12 +162,12 @@ subtest '\'Calendar\' tests' => sub { > cmp_ok($cal->addDate( $test_dt, $seven_day_dur, 'days' ), 'eq', > '2012-07-31T11:53:00', > 'Add 7 days (Calendar)' ); >-}; > > >-subtest '\'Days\' tests' => sub { >- my $cal = Koha::Calendar->new( TEST_MODE => 1, >- days_mode => 'Days' ); >+ >+ ## 'Days' tests >+ $cal = Koha::Calendar->new( TEST_MODE => 1, >+ days_mode => 'Days' ); > > $cal->add_holiday( dt_from_string('2012-07-04','iso') ); > $dt = dt_from_string('2012-07-03','iso'); >@@ -179,4 +179,4 @@ subtest '\'Days\' tests' => sub { > cmp_ok($cal->addDate( $test_dt, $seven_day_dur, 'days' ),'eq', > '2012-07-30T11:53:00', > 'Add 7 days (Days)' ); >-}; >+ >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9142
:
13679
|
13692
|
13717