Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
ce934761
Commit
ce934761
authored
Oct 20, 2014
by
Roy Storey
Browse files
module methods tests
parent
ae1f4451
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
t/01.utils/modules.t
t/01.utils/modules.t
+40
-0
No files found.
t/01.utils/modules.t
0 → 100644
View file @
ce934761
use
strict
;
use
warnings
;
use
lib
'
t/lib/
';
use
Test::
More
;
use
Data::
Dumper
;
BEGIN
{
use_ok
(
'
Bio::EnsEMBL::Hive::Utils
',
'
load_file_or_module
',
'
find_submodules
'
);
}
#########################
my
$hive
=
find_submodules
'
Bio::EnsEMBL
';
isa_ok
(
$hive
,
'
ARRAY
');
is
(
@$hive
,
1
,
'
single return
');
is
(
$hive
->
[
0
],
'
Bio::EnsEMBL::Hive
',
'
found hive
');
$hive
=
find_submodules
'
Bio/EnsEMBL
';
isa_ok
(
$hive
,
'
ARRAY
');
is
(
@$hive
,
1
,
'
single return
');
is
(
$hive
->
[
0
],
'
Bio::EnsEMBL::Hive
',
'
found hive
');
my
$pipe_configs
=
find_submodules
'
Bio::EnsEMBL::Hive::PipeConfig
';
ok
(
$pipe_configs
,
'
configs found
');
isa_ok
(
$pipe_configs
,
'
ARRAY
');
## still an array
my
@sorted_configs
=
sort
{
$a
cmp
$b
}
@$pipe_configs
;
is
(
@sorted_configs
,
13
,
'
lucky number
');
my
(
$generic
)
=
grep
{
/HiveGeneric_conf/
}
@sorted_configs
;
ok
(
$generic
,
'
found generic base config
');
## loading the module
my
$module
=
load_file_or_module
(
$generic
);
is
(
$module
,
$generic
,
'
all good
'
);
## and by file name ...
done_testing
();
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment