Skip to content

Commit d21ff93

Browse files
committed
t/SeqTools/CodonTable.t: test for removed codon tables (#386)
Codon tables are sometimes removed, e.g., codon table id=7. Previously, instead of being handled as invalid tables, these would return the "''" (because they were parsed from a `qw()`. Since a73febe the tables are parsed straight from the gc.prt, the tables array gets a real empty string, adn are handled as invalid. In PR #386 a test was added that the "''" was returned. This is no longer needed. This commit tests that when a table is empty (id=7) it's properly identified as invalid to avoid a regression.
1 parent 9f6beda commit d21ff93

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

t/SeqTools/CodonTable.t

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use strict;
66
BEGIN {
77
use Bio::Root::Test;
88

9-
test_begin(-tests => 89);
9+
test_begin(-tests => 91);
1010

1111
use_ok('Bio::Tools::CodonTable');
1212
use_ok('Bio::CodonUsage::IO');
@@ -30,7 +30,8 @@ is $myCodonTable->name(), "Standard";
3030

3131
# Test invalid IDs warn and return table id=1
3232
{
33-
foreach my $invalid_id (99, -2) {
33+
# ID table 7 is invalid because it has been removed
34+
foreach my $invalid_id (99, -2, 7) {
3435
my $stderr = '';
3536
# capture stderr output
3637
local *STDERR;

0 commit comments

Comments
 (0)