diff --git a/modules/t/attributeAdaptor.t b/modules/t/attributeAdaptor.t index 92c085a2767bcde02b9e27ceed1f6a4705629dcb..d168b80ec96a2e16ade47a3ef4041bb6a43f877e 100644 --- a/modules/t/attributeAdaptor.t +++ b/modules/t/attributeAdaptor.t @@ -7,7 +7,8 @@ use Test::More; use Bio::EnsEMBL::Test::MultiTestDB; use Bio::EnsEMBL::Attribute; -our $verbose = 0; +our $verbose = 1; +our $clean = 0; my $multi = Bio::EnsEMBL::Test::MultiTestDB->new; @@ -75,6 +76,17 @@ ok($attrib->code eq 'test_code'); ok($attrib->description eq 'test_desc'); ok($attrib->value eq 'test_value'); +@attribs = @{ $aa->fetch_all_by_MiscFeature() }; + +ok(@attribs == 1); + +$attrib = $attribs[0]; + +ok($attrib->name eq 'test_name'); +ok($attrib->code eq 'test_code'); +ok($attrib->description eq 'test_desc'); +ok($attrib->value eq 'test_value'); + # # test the removal of this attribute @@ -98,6 +110,7 @@ ok(@attribs == 0); + ################# # Slice functionality tests # @@ -134,16 +147,16 @@ ok($count == 1); # test that we can now retrieve this attribute # @attribs = @{$aa->fetch_all_by_Slice($slice)}; - ok(@attribs == 1); - @attribs = @{$aa->fetch_all_by_Slice($slice,"rubbish")}; ok(@attribs == 0); @attribs = @{$aa->fetch_all_by_Slice($slice,"test_code2")}; ok(@attribs == 1); +@attribs = @{$aa->fetch_all_by_Slice(undef,"test_code2")}; +ok(@attribs == 1); $attrib = $attribs[0]; @@ -213,6 +226,10 @@ ok($count == 1); note "attribs: " . scalar(@attribs); ok(@attribs == 1); +@attribs = @{$aa->fetch_all_by_Slice(undef)}; +ok(@attribs == 1); + + # # test the removal of this attribute