Skip to content
Snippets Groups Projects
Commit f750031a authored by Matthieu Muffato's avatar Matthieu Muffato
Browse files

bugfix: get_all_DBAdaptors() should always be returning an array-ref

parent 8a0ca96a
No related branches found
No related tags found
2 merge requests!206bugfix: get_all_DBAdaptors() should always be returning an array-ref,!206bugfix: get_all_DBAdaptors() should always be returning an array-ref
......@@ -670,7 +670,7 @@ sub get_all_DBAdaptors {
my ( $species, $group ) = rearrange( [qw(SPECIES GROUP)], @args );
if ( !defined($species) && !defined($group) ) {
return $registry_register{'_DBA'};
return $registry_register{'_DBA'} || [];
}
if ( defined($species) ) {
......
......@@ -36,12 +36,15 @@ else {
note 'Using non-threaded tests';
}
my $reg = 'Bio::EnsEMBL::Registry';
# Check whilst the Registry is empty
is_deeply($reg->get_all_DBAdaptors(), [], 'get_all_DBAdaptors() returns an array-ref even when the Registry is empty');
my $multi_db = Bio::EnsEMBL::Test::MultiTestDB->new();
my $db = $multi_db->get_DBAdaptor('core');
my $dbc = $db->dbc();
my $reg = 'Bio::EnsEMBL::Registry';
my $registry_template = <<'TMPL';
{
package Reg;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment