The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
package UR::Test;
use base 'Test::Builder::Module';

use strict;
use warnings;

use Exporter 'import';
our @EXPORT_OK = qw(txtest);

sub txtest {
    my ($name, $subtests, @args) = @_;
    my $tb = __PACKAGE__->builder;
    my $tx = UR::Context::Transaction->begin();
    my $rv = $tb->subtest($name, $subtests, @args);
    $tx->rollback;
    return $rv;
};

1;