SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

 
 

perl-Test-Abortable rpm build for : OpenSuSE. For other distributions click perl-Test-Abortable.

Name : perl-Test-Abortable
Version : 0.3.0 Vendor : obs://build_opensuse_org/devel:languages:perl
Release : 150500.1.1 Date : 2024-08-18 23:51:30
Group : Unspecified Source RPM : perl-Test-Abortable-0.3.0-150500.1.1.src.rpm
Size : 0.03 MB
Packager : https://www_suse_com/
Summary : Subtests That You Can Die Your Way Out of ... But Survive
Description :
Test::Abortable provides a simple system for catching some exceptions and
turning them into test events. For example, consider the code below:

use Test::More;
use Test::Abortable;

use My::API; # code under test

my $API = My::API->client;

subtest \"collection distinction\" => sub {
my $result = $API->do_first_thing;

is($result->documents->first->title, \"The Best Thing\");
isnt($result->documents->last->title, \"The Best Thing\");
};

subtest \"document transcendence\" => sub { ... };
subtest \"semiotic multiplexing\" => sub { ... };
subtest \"homoiousios type vectors\" => sub { ... };

done_testing;

In this code, \'$result->documents\' is a collection. It has a \'first\' method
that will throw an exception if the collection is empty. If that happens in
our code, our test program will die and most of the other subtests won\'t
run. We\'d rather that we only abort the _subtest_. We could do that in a
bunch of ways, like adding:

return fail(\"no documents in response\") if $result->documents->is_empty;

...but this becomes less practical as the number of places that might throw
these kinds of exceptions grows. To minimize code that boils down to \"and
then stop unless it makes sense to go on,\" Test::Abortable provides a means
to communicate, via exceptions, that the running subtest should be aborted,
possibly with some test output, and that the program should then continue.

Test::Abortable exports a \'subtest\' routine that behaves like the one in
Test::More|Test::More/subtest but will handle and recover from abortable
exceptions (defined below). It also exports \'testeval\', which behaves like
a block eval that only catches abortable exceptions.

For an exception to be \"abortable,\" in this sense, it must respond to a
\'as_test_abort_events\' method. This method must return an arrayref of
arrayrefs that describe the Test2 events to emit when the exception is
caught. For example, the exception thrown by our sample code above might
have a \'as_test_abort_events\' method that returns:

[
[ Ok => (pass => 0, name => \"->first called on empty collection\") ],
]

It\'s permissible to have passing Ok events, or only Diag events, or
multiple events, or none — although providing none might lead to some
serious confusion.

Right now, any exception that provides this method will be honored. In the
future, a facility for only allowing abortable exceptions of a given class
may be added.

RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl/SLE_15_SP5/noarch

Content of RPM  Changelog  Provides Requires

Download
ftp.icm.edu.pl  perl-Test-Abortable-0.3.0-150500.1.1.noarch.rpm
     

Provides :
perl(Test::Abortable)
perl-Test-Abortable

Requires :
perl(:MODULE_COMPAT_5.26.1)
perl(Sub::Exporter)
perl(Test2::API) >= 1.302075
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1


Content of RPM :
/usr/lib/perl5/vendor_perl/5.26.1/Test
/usr/lib/perl5/vendor_perl/5.26.1/Test/Abortable.pm
/usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi
/usr/share/doc/packages/perl-Test-Abortable
/usr/share/doc/packages/perl-Test-Abortable/Changes
/usr/share/doc/packages/perl-Test-Abortable/README
/usr/share/licenses/perl-Test-Abortable
/usr/share/licenses/perl-Test-Abortable/LICENSE
/usr/share/man/man3/Test::Abortable.3pm.gz

 
ICM