Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
ensembl
Commits
2645315f
Commit
2645315f
authored
7 years ago
by
Tiago Grego
Browse files
Options
Downloads
Patches
Plain Diff
Added biotype.t test to check warning in fetch_all_by_object_type
parent
795b13b0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!228
Biotype in Core schema
,
!228
Biotype in Core schema
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/t/biotype.t
+9
-2
9 additions, 2 deletions
modules/t/biotype.t
with
9 additions
and
2 deletions
modules/t/biotype.t
+
9
−
2
View file @
2645315f
...
...
@@ -17,7 +17,7 @@ use strict;
use
warnings
;
use
Test::
More
;
use
Test::
Warnings
qw(
allow_
warning
s
)
;
use
Test::
Warnings
qw( warning )
;
use
Test::
Exception
;
use
Bio::EnsEMBL::Test::
MultiTestDB
;
...
...
@@ -26,7 +26,6 @@ use Bio::EnsEMBL::Test::TestUtils;
our
$verbose
=
0
;
#set to 1 to turn on debug printouts
# Get a DBAdaptor to from the test system
my
$multi
=
Bio::EnsEMBL::Test::
MultiTestDB
->
new
;
ok
(
$multi
,
"
Test DB loaded successfully
");
...
...
@@ -93,5 +92,13 @@ my $biotypes = $biotype_adaptor->fetch_all_by_object_type('gene');
is
(
ref
$biotypes
,
'
ARRAY
',
'
Got an array
');
is
(
scalar
@
{
$biotypes
},
'
2
',
'
of size 2
');
is_deeply
(
$biotypes
,
[
$biotype1
,
$biotype3
],
'
with the correct objects
');
my
$warning
=
warning
{
$biotypes
=
$biotype_adaptor
->
fetch_all_by_object_type
('
none
')
};
like
(
$warning
,
qr/No objects retrieved. Check if object_type 'none' is correct./
,
"
Got a warning from fetch_all_by_object_type('none')
",
)
or
diag
'
Got warning:
',
explain
(
$warning
);
is
(
ref
$biotypes
,
'
ARRAY
',
'
Got an array
');
is
(
scalar
@
{
$biotypes
},
'
0
',
'
of size 0
');
is_deeply
(
$biotypes
,
[]
,
'
totally empty
');
done_testing
();
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment