From 2591b38b45c97010f518984eb3a34e24fb23dd9e Mon Sep 17 00:00:00 2001 From: Robert Rothenberg Date: Sat, 4 Apr 2020 10:53:18 +0100 Subject: Use Test::More and Test::Deep to avoid warnings in latest Test::Most The latest Test::Most is triggering warnings > (in cleanup) (in cleanup) at ... /Test/Most.pm line 290 during > global destruction. While this isn't treated as a failure by Test::Warnings, it is perhaps safer to not use it. --- Changes | 3 +++ cpanfile | 2 +- t/01-basic.t | 3 ++- t/02-legacy.t | 3 ++- t/10-getloadavg.t | 3 ++- t/11-proc_loadavg.t | 3 ++- t/12-uptime.t | 3 ++- t/13-w.t | 3 ++- 8 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Changes b/Changes index f182e4e..62b7b9a 100644 --- a/Changes +++ b/Changes @@ -4,6 +4,9 @@ Revision history for Perl extension {{$dist->name}}: [Tests] - Test for warnings. + - Use Test::More and Test::Deep instead of Test::Most, + due to global destruction warnings in latest Test::Most. + [Documentation] - Added contributors names in Changes for earlier versions. diff --git a/cpanfile b/cpanfile index b54d523..c35f53b 100644 --- a/cpanfile +++ b/cpanfile @@ -13,8 +13,8 @@ on 'test' => sub { requires "File::Spec" => "0"; requires "Module::Metadata" => "0"; requires "Scalar::Util" => "0"; + requires "Test::Deep" => "0"; requires "Test::More" => "0"; - requires "Test::Most" => "0"; requires "Test::Warnings" => "0"; }; diff --git a/t/01-basic.t b/t/01-basic.t index 4844e60..24e9f3a 100644 --- a/t/01-basic.t +++ b/t/01-basic.t @@ -1,4 +1,5 @@ -use Test::Most; +use Test::More; +use Test::Deep; use Test::Warnings; use Scalar::Util 'looks_like_number'; diff --git a/t/02-legacy.t b/t/02-legacy.t index fff5974..52b8020 100644 --- a/t/02-legacy.t +++ b/t/02-legacy.t @@ -1,4 +1,5 @@ -use Test::Most; +use Test::More; +use Test::Deep; use Test::Warnings; use Scalar::Util 'looks_like_number'; diff --git a/t/10-getloadavg.t b/t/10-getloadavg.t index a6f1b4a..2c9fb4c 100644 --- a/t/10-getloadavg.t +++ b/t/10-getloadavg.t @@ -1,4 +1,5 @@ -use Test::Most; +use Test::More; +use Test::Deep; use Test::Warnings; use Scalar::Util 'looks_like_number'; diff --git a/t/11-proc_loadavg.t b/t/11-proc_loadavg.t index c1918fd..a70e528 100644 --- a/t/11-proc_loadavg.t +++ b/t/11-proc_loadavg.t @@ -1,4 +1,5 @@ -use Test::Most; +use Test::More; +use Test::Deep; use Test::Warnings; use Scalar::Util 'looks_like_number'; diff --git a/t/12-uptime.t b/t/12-uptime.t index 5da340c..7289a78 100644 --- a/t/12-uptime.t +++ b/t/12-uptime.t @@ -1,4 +1,5 @@ -use Test::Most; +use Test::More; +use Test::Deep; use Test::Warnings; use File::Which qw/ which /; diff --git a/t/13-w.t b/t/13-w.t index 02bc939..fa56b4b 100644 --- a/t/13-w.t +++ b/t/13-w.t @@ -1,4 +1,5 @@ -use Test::Most; +use Test::More; +use Test::Deep; use Test::Warnings; use File::Which qw/ which /; -- cgit v1.2.3