Skip to content
Snippets Groups Projects
Commit 7b99af5d authored by Magali Ruffier's avatar Magali Ruffier Committed by GitHub
Browse files

Merge pull request #206 from muffato/bugfix/get_all_DBAdaptors_undef

bugfix: get_all_DBAdaptors() should always be returning an array-ref
parents 30ad6090 f750031a
No related branches found
No related tags found
No related merge requests found
......@@ -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