Skip to content

Commit 598d8d1

Browse files
haargoalders
authored andcommitted
make Test::Memory::Cycle a normal prereq
Since Test::Memory::Cycle is listed as a test prereq, don't need to cope with it being missing. Remove the hard coded dependency since it will be picked up by AutoPrereqs.
1 parent abb350c commit 598d8d1

File tree

12 files changed

+25
-110
lines changed

12 files changed

+25
-110
lines changed

dist.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ Scalar::Util = 1.14
2929

3030
[Prereqs / TestRequires]
3131
HTTP::Daemon = 6.12
32-
Test::Memory::Cycle = 1.06
3332

3433
[Prereqs / DevelopRequires]
3534
LWP::Protocol::https = 6.07

t/00-load.t

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,9 @@
22

33
use warnings;
44
use strict;
5-
use lib 't';
65
use Test::More tests => 2;
7-
use Tools qw( $canTMC );
86

97
use_ok( 'WWW::Mechanize' );
108
use_ok( 'WWW::Mechanize::Link' );
119

1210
diag( "Testing WWW::Mechanize $WWW::Mechanize::VERSION, with LWP $LWP::VERSION, Perl $], $^X" );
13-
if ( $canTMC ) {
14-
diag( "Test::Memory::Cycle $Test::Memory::Cycle::VERSION is installed." );
15-
}
16-
else {
17-
diag( 'Test::Memory::Cycle is not installed.' );
18-
}

t/Tools.pm

Lines changed: 0 additions & 20 deletions
This file was deleted.

t/area_link.t

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ use warnings;
55
use strict;
66
use Test::More tests => 9;
77

8-
use lib 't';
9-
10-
BEGIN {
11-
use Tools qw( $canTMC memory_cycle_ok );
12-
}
8+
use Test::Memory::Cycle;
139

1410
BEGIN {
1511
use_ok( 'WWW::Mechanize' );
@@ -62,16 +58,9 @@ AREA_CHECKS: {
6258
my $linkref = $mech->find_all_links();
6359
is_deeply( $linkref, \@wanted_links, 'Correct links came back' );
6460

65-
SKIP: {
66-
skip 'Test::Memory::Cycle not installed', 2 unless $canTMC;
67-
memory_cycle_ok( \@links, 'Link list: no cycles' );
68-
memory_cycle_ok( $linkref, 'Single link: no cycles' );
69-
}
61+
memory_cycle_ok( \@links, 'Link list: no cycles' );
62+
memory_cycle_ok( $linkref, 'Single link: no cycles' );
7063
}
7164

72-
SKIP: {
73-
skip 'Test::Memory::Cycle not installed', 2 unless $canTMC;
74-
75-
memory_cycle_ok( $uri, 'URI: no cycles' );
76-
memory_cycle_ok( $mech, 'Mech: no cycles' );
77-
}
65+
memory_cycle_ok( $uri, 'URI: no cycles' );
66+
memory_cycle_ok( $mech, 'Mech: no cycles' );

t/local/back.t

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use warnings;
22
use strict;
33
use Test::More tests => 47;
4-
use lib qw( t t/local );
4+
use lib qw( t/local );
55
use LocalServer ();
66

77

@@ -14,9 +14,7 @@ and subsequently enriched to deal with RT ticket #8109.
1414
1515
=cut
1616

17-
BEGIN {
18-
use Tools qw( $canTMC memory_cycle_ok );
19-
}
17+
use Test::Memory::Cycle;
2018

2119
BEGIN {
2220
delete @ENV{ qw( IFS CDPATH ENV BASH_ENV ) };
@@ -106,11 +104,7 @@ ok(defined($mech->cookie_jar()),
106104

107105
# Now some other weird stuff. Start with a fresh history by recreating
108106
# $mech.
109-
SKIP: {
110-
skip 'Test::Memory::Cycle not installed', 1 unless $canTMC;
111-
112-
memory_cycle_ok( $mech, 'No memory cycles found' );
113-
}
107+
memory_cycle_ok( $mech, 'No memory cycles found' );
114108

115109
$mech = WWW::Mechanize->new( autocheck => 0 );
116110
isa_ok( $mech, 'WWW::Mechanize' );
@@ -146,10 +140,4 @@ for my $link ( @links ) {
146140
is( $mech->uri, $server->url, "Back from $link" );
147141
}
148142

149-
SKIP: {
150-
skip 'Test::Memory::Cycle not installed', 1 unless $canTMC;
151-
152-
memory_cycle_ok( $mech, 'No memory cycles found' );
153-
}
154-
155-
143+
memory_cycle_ok( $mech, 'No memory cycles found' );

t/local/get.t

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ use warnings;
22
use strict;
33
use Test::More tests => 34;
44

5-
use lib qw( t t/local );
5+
use lib qw( t/local );
66
use LocalServer ();
77

8-
BEGIN {
9-
use Tools qw( $canTMC memory_cycle_ok );
10-
}
8+
use Test::Memory::Cycle;
119

1210
BEGIN {
1311
delete @ENV{ qw( IFS CDPATH ENV BASH_ENV ) };
@@ -64,11 +62,7 @@ ok( -e $tempfile, 'File exists' );
6462
is( -s $tempfile, $rslength, 'Did all the bytes get saved?' );
6563
unlink $tempfile;
6664

67-
SKIP: {
68-
skip 'Test::Memory::Cycle not installed', 1 unless $canTMC;
69-
70-
memory_cycle_ok( $agent, 'Mech: no cycles' );
71-
}
65+
memory_cycle_ok( $agent, 'Mech: no cycles' );
7266

7367
$agent->get('/foo/');
7468
ok( ! $agent->redirects, 'redirects is false before we have a redirect');

t/local/head.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use warnings;
22
use strict;
33
use Test::More;
44

5-
use lib qw( t t/local );
5+
use lib qw( t/local );
66
use LocalServer ();
77

88
BEGIN {
@@ -25,4 +25,4 @@ $agent->head( '/foo.html' );
2525
ok !$agent->content, 'HEADing returns no content';
2626
is my $filename = $agent->response->filename, 'foo.html', '... but the filename is set';
2727

28-
done_testing;
28+
done_testing;

t/local/post.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use warnings;
22
use strict;
33
use Test::More tests => 5;
44

5-
use lib qw( t t/local );
5+
use lib qw( t/local );
66
use LocalServer ();
77

88
BEGIN {

t/local/referer.t

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ use FindBin ();
44

55
use Test::More tests => 14;
66

7-
BEGIN {
8-
use lib 't';
9-
use Tools qw( $canTMC memory_cycle_ok );
10-
}
7+
use Test::Memory::Cycle;
118

129
BEGIN {
1310
delete @ENV{ qw( IFS CDPATH ENV BASH_ENV ) };
@@ -60,11 +57,7 @@ SKIP: {
6057
ok( $agent->success, 'Quit OK' );
6158
};
6259

63-
SKIP: {
64-
skip 'Test::Memory::Cycle not installed', 1 unless $canTMC;
65-
66-
memory_cycle_ok( $agent, 'No memory cycles found' );
67-
}
60+
memory_cycle_ok( $agent, 'No memory cycles found' );
6861

6962
END {
7063
close $server if $server;

t/local/reload.t

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ use warnings;
22
use strict;
33
use Test::More tests => 15;
44

5-
use lib qw( t t/local );
5+
use lib qw( t/local );
66
use LocalServer ();
77

8-
BEGIN {
9-
use Tools qw( $canTMC memory_cycle_ok );
10-
}
8+
use Test::Memory::Cycle;
119

1210
BEGIN {
1311
delete @ENV{ qw( IFS CDPATH ENV BASH_ENV ) };
@@ -51,8 +49,4 @@ RELOAD: {
5149
is( $cookie_after, $cookie_before, 'cookies are not multiplied' );
5250
}
5351

54-
SKIP: {
55-
skip 'Test::Memory::Cycle not installed', 1 unless $canTMC;
56-
57-
memory_cycle_ok( $agent, 'Mech: no cycles' );
58-
}
52+
memory_cycle_ok( $agent, 'Mech: no cycles' );

0 commit comments

Comments
 (0)