[Biopython-dev] [Bug 2891] New: Jython test_NCBITextParser fix+patch

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Fri Jul 31 16:06:32 EDT 2009


http://bugzilla.open-bio.org/show_bug.cgi?id=2891

           Summary: Jython test_NCBITextParser fix+patch
           Product: Biopython
           Version: 1.51b
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Unit Tests
        AssignedTo: biopython-dev at biopython.org
        ReportedBy: kellrott at ucsd.edu


Jython is limited to JVM method sizes, overly large methods cause JVM
exceptions (java.lang.ClassFormatError: Invalid method Code length ...).  The
test_NCBITextParser unit test contains a few methods that are larger then the
JVM limit.  This can be fixed by breaking some of the methods into multi
segment tests.  So test_bt007 becomes test_bt007a and test_bt007b.

A sample fix patch, tested with Jython2.5.0:


713c713
<     def test_bt007(self):
---
>     def test_bt007a(self):
1242a1243,1250
> 
>     def test_bt007b(self):
>         "Test parsing PHI-BLAST, BLASTP 2.0.10 output, three rounds (bt007)"
> 
>         path = os.path.join('Blast', 'bt007')
>         handle = open(path)
>         record = self.pb_parser.parse(handle)
> 
1891c1899
<     def test_bt009(self):
---
>     def test_bt009a(self):
2525a2534,2541
> 
> 
>     def test_bt009b(self):
>         "Test parsing PHI-BLAST, BLASTP 2.0.10 output, two rounds (bt009)"
> 
>         path = os.path.join('Blast', 'bt009')
>         handle = open(path)
>         record = self.pb_parser.parse(handle)
5635c5651
<     def test_bt047(self):
---
>     def test_bt047a(self):
6251a6268,6275
> 
>     def test_bt047b(self):
>         "Test parsing PHI-BLAST, BLASTP 2.0.11 output, two rounds (bt047)"
> 
>         path = os.path.join('Blast', 'bt047')
>         handle = open(path)
>         record = self.pb_parser.parse(handle)
> 
9959c9983
<     def test_bt060(self):
---
>     def test_bt060a(self):
10330a10355,10362
> 
>    def test_bt060b(self):
>         "Test parsing BLASTP 2.0.12 output (bt060)"
> 
>         path = os.path.join('Blast', 'bt060')
>         handle = open(path)
>         record = self.pb_parser.parse(handle)
> 
11000a11033,11041
> 
> 
>     def test_bt060c(self):
>         "Test parsing BLASTP 2.0.12 output (bt060)"
> 
>         path = os.path.join('Blast', 'bt060')
>         handle = open(path)
>         record = self.pb_parser.parse(handle)
> 
11504a11546,11552
> 
>     def test_bt060d(self):
>         "Test parsing BLASTP 2.0.12 output (bt060)"
> 
>         path = os.path.join('Blast', 'bt060')
>         handle = open(path)
>         record = self.pb_parser.parse(handle)
11812a11861,11866
> 
>     def test_bt060e(self):
>         "Test parsing BLASTP 2.0.12 output (bt060)"
> 
>         path = os.path.join('Blast', 'bt060')
>         handle = open(path)


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Biopython-dev mailing list