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
381c2cb0
Commit
381c2cb0
authored
11 years ago
by
Andy Yates
Browse files
Options
Downloads
Patches
Plain Diff
removing smart match operators from the test suite
parent
991a724a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/t/circularSlice.t
+29
-28
29 additions, 28 deletions
modules/t/circularSlice.t
modules/t/schemaPatches.t
+0
-2
0 additions, 2 deletions
modules/t/schemaPatches.t
with
29 additions
and
30 deletions
modules/t/circularSlice.t
+
29
−
28
View file @
381c2cb0
...
...
@@ -337,21 +337,28 @@ foreach my $sl (sort keys %{$slices}) {
foreach
my
$table
(
@tables
)
{
my
$query
;
my
$table_in_stable_id_tables
=
0
;
foreach
my
$stable_id_table
(
@stable_id_tables
)
{
$table_in_stable_id_tables
=
1
if
$stable_id_table
eq
$table
;
last
;
}
if
(
$sstart
>
$send
)
{
$query
=
sprintf
$query_templates
[
0
],
$table
,
$table
~~
@stable_id_tables
?'
, stable_id
':'',
$table
,
$seq_id
,
$sstart
,
$send
,
$sstart
,
$send
;
}
else
{
$query
=
sprintf
$query_templates
[
1
],
$table
,
$table
~~
@stable_id_tables
?'
, stable_id
':'',
$table
,
$seq_id
,
$send
,
$sstart
,
$send
,
$sstart
;
$query
=
sprintf
$query_templates
[
0
],
$table
,
$table_in_stable_id_tables
?
'
, stable_id
':'',
$table
,
$seq_id
,
$sstart
,
$send
,
$sstart
,
$send
;
}
else
{
$query
=
sprintf
$query_templates
[
1
],
$table
,
$table_in_stable_id_tables
?
'
, stable_id
':'',
$table
,
$seq_id
,
$send
,
$sstart
,
$send
,
$sstart
;
}
my
$expected_objects
=
$sql_helper
->
execute
(
-
SQL
=>
$query
,
-
USE_HASHREFS
=>
1
,
-
CALLBACK
=>
sub
{
my
$row
=
shift
@_
;
return
feature_slice_boundaries
(
$row
,
$sstart
,
$send
,
$sstrand
,
$srl
);
});
my
$expected_objects
=
$sql_helper
->
execute
(
-
SQL
=>
$query
,
-
USE_HASHREFS
=>
1
,
-
CALLBACK
=>
sub
{
my
$row
=
shift
@_
;
return
feature_slice_boundaries
(
$row
,
$sstart
,
$send
,
$sstrand
,
$srl
);
}
);
my
$method
=
ucfirst
(
$table
);
$method
=~
s/_([a-z])/\u$1/g
;
$method
=
sprintf
'
get_all_%ss
',
$method
;
# print "Calling $method\n";
...
...
@@ -359,25 +366,19 @@ foreach my $sl (sort keys %{$slices}) {
is
(
scalar
@
{
$got_objects
},
scalar
@
{
$expected_objects
},
sprintf
"
Number of
$table
objects on slice [%d, %d]
",
$sstart
,
$send
);
foreach
my
$expected
(
@
{
$expected_objects
})
{
my
$got
=
(
grep
{
$expected
->
{
db_id
}
==
$_
->
dbID
}
@
{
$got_objects
})[
0
];
SKIP:
{
skip
'
Cannot test attributes with no returned object
',
1
unless
$got
;
ok
(
$got
,
sprintf
"
Object of type
$table
(%d) retrieved
",
$got
->
dbID
);
is
(
$got
->
stable_id
,
$expected
->
{
stable_id
},
sprintf
"
%d: stable id
",
$got
->
dbID
)
if
$table
~~
@stable_id_tables
;
is
(
$got
->
start
,
$expected
->
{
start
},
sprintf
"
%d: start
",
$got
->
dbID
);
is
(
$got
->
end
,
$expected
->
{
end
},
sprintf
"
%d: end
",
$got
->
dbID
);
is
(
$got
->
strand
,
$expected
->
{
strand
},
sprintf
"
%d: strand
",
$got
->
dbID
);
}
}
my
$got
=
(
grep
{
$expected
->
{
db_id
}
==
$_
->
dbID
}
@
{
$got_objects
})[
0
];
SKIP:
{
skip
'
Cannot test attributes with no returned object
',
1
unless
$got
;
ok
(
$got
,
sprintf
"
Object of type
$table
(%d) retrieved
",
$got
->
dbID
);
is
(
$got
->
stable_id
,
$expected
->
{
stable_id
},
sprintf
"
%d: stable id
",
$got
->
dbID
)
if
$table_in_stable_id_tables
;
is
(
$got
->
start
,
$expected
->
{
start
},
sprintf
"
%d: start
",
$got
->
dbID
);
is
(
$got
->
end
,
$expected
->
{
end
},
sprintf
"
%d: end
",
$got
->
dbID
);
is
(
$got
->
strand
,
$expected
->
{
strand
},
sprintf
"
%d: strand
",
$got
->
dbID
);
}
}
}
}
}
#
...
...
This diff is collapsed.
Click to expand it.
modules/t/schemaPatches.t
+
0
−
2
View file @
381c2cb0
...
...
@@ -180,8 +180,6 @@ sub compare_after_patches {
$dbc
->
do
("
use
$source_schema
");
my
$source_patches
=
$sql_helper
->
execute_simple
(
-
SQL
=>
"
select meta_value from meta where meta_key='patch' and meta_value like 'patch_
${last_release}
_
${current_release}
_%'
");
# Does not work on <5.10 versions of Perl
# map { ok($_ ~~ @{$source_patches}, "$_ in patched database") } @{$target_patches};
my
%source_patches
;
map
{
$source_patches
{
$_
}
++
}
@
{
$source_patches
};
map
{
ok
(
exists
$source_patches
{
$_
},
"
$_
in patched database
")
}
@
{
$target_patches
};
...
...
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